Author: Fangrui Song Date: 2020-03-15T13:11:49-07:00 New Revision: a1e940b1853a69b14b1f66952256e8cb16e6a0aa
URL: https://github.com/llvm/llvm-project/commit/a1e940b1853a69b14b1f66952256e8cb16e6a0aa DIFF: https://github.com/llvm/llvm-project/commit/a1e940b1853a69b14b1f66952256e8cb16e6a0aa.diff LOG: [Driver][test] Add a specific test file for -fmerge-all-constants Also, delete the option from the `// Test that we don't error on these.` block in test/Driver/clang_f_opts.c Added: clang/test/Driver/fmerge-constants.c Modified: clang/test/Driver/clang_f_opts.c Removed: ################################################################################ diff --git a/clang/test/Driver/clang_f_opts.c b/clang/test/Driver/clang_f_opts.c index bda026715c36..180d4713dcb4 100644 --- a/clang/test/Driver/clang_f_opts.c +++ b/clang/test/Driver/clang_f_opts.c @@ -304,7 +304,6 @@ // RUN: -fno-inline-small-functions -finline-small-functions \ // RUN: -fno-fat-lto-objects -ffat-lto-objects \ // RUN: -fno-merge-constants -fmerge-constants \ -// RUN: -fno-merge-all-constants -fmerge-all-constants \ // RUN: -fno-caller-saves -fcaller-saves \ // RUN: -fno-reorder-blocks -freorder-blocks \ // RUN: -fno-schedule-insns2 -fschedule-insns2 \ @@ -544,13 +543,6 @@ // CHECK-DISCARD-NAMES: "-discard-value-names" // CHECK-NO-DISCARD-NAMES-NOT: "-discard-value-names" -// RUN: %clang -### -S -fmerge-all-constants %s 2>&1 | FileCheck -check-prefix=CHECK-MERGE-ALL-CONSTANTS %s -// RUN: %clang -### -S -fno-merge-all-constants %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MERGE-ALL-CONSTANTS %s -// RUN: %clang -### -S -fmerge-all-constants -fno-merge-all-constants %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MERGE-ALL-CONSTANTS %s -// RUN: %clang -### -S -fno-merge-all-constants -fmerge-all-constants %s 2>&1 | FileCheck -check-prefix=CHECK-MERGE-ALL-CONSTANTS %s -// CHECK-NO-MERGE-ALL-CONSTANTS-NOT: "-fmerge-all-constants" -// CHECK-MERGE-ALL-CONSTANTS: "-fmerge-all-constants" - // RUN: %clang -### -S -fdelete-null-pointer-checks %s 2>&1 | FileCheck -check-prefix=CHECK-NULL-POINTER-CHECKS %s // RUN: %clang -### -S -fno-delete-null-pointer-checks %s 2>&1 | FileCheck -check-prefix=CHECK-NO-NULL-POINTER-CHECKS %s // RUN: %clang -### -S -fdelete-null-pointer-checks -fno-delete-null-pointer-checks %s 2>&1 | FileCheck -check-prefix=CHECK-NO-NULL-POINTER-CHECKS %s diff --git a/clang/test/Driver/fmerge-constants.c b/clang/test/Driver/fmerge-constants.c new file mode 100644 index 000000000000..c478a9d7b1e5 --- /dev/null +++ b/clang/test/Driver/fmerge-constants.c @@ -0,0 +1,6 @@ +// RUN: %clang -### -c %s -fno-merge-all-constants -fmerge-all-constants 2>&1 | FileCheck %s +// CHECK: "-fmerge-all-constants" + +// RUN: %clang -### -c %s 2>&1 | FileCheck --check-prefix=NO %s +// RUN: %clang -### -c %s -fmerge-all-constants -fno-merge-all-constants 2>&1 | FileCheck --check-prefix=NO %s +// NO-NOT: "-fmerge-all-constants" _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits