Changeset View
Changeset View
Standalone View
Standalone View
clang/test/Driver/clang_f_opts.c
// REQUIRES: clang-driver | // REQUIRES: clang-driver | ||||
// RUN: %clang -### -S -fasm -fblocks -fbuiltin -fno-math-errno -fcommon -fpascal-strings -fno-blocks -fno-builtin -fmath-errno -fno-common -fno-pascal-strings -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings -fsplit-stack %s 2>&1 | FileCheck -check-prefix=CHECK-OPTIONS1 %s | // RUN: %clang_bin -### -S -fasm -fblocks -fbuiltin -fno-math-errno -fcommon -fpascal-strings -fno-blocks -fno-builtin -fmath-errno -fno-common -fno-pascal-strings -fblocks -fbuiltin -fmath-errno -fcommon -fpascal-strings -fsplit-stack %s 2>&1 | FileCheck -check-prefix=CHECK-OPTIONS1 %s | ||||
// RUN: %clang -### -S -fasm -fblocks -fbuiltin -fno-math-errno -fcommon -fpascal-strings -fno-asm -fno-blocks -fno-builtin -fmath-errno -fno-common -fno-pascal-strings -fno-show-source-location -fshort-enums %s 2>&1 | FileCheck -check-prefix=CHECK-OPTIONS2 %s | // RUN: %clang_bin -### -S -fasm -fblocks -fbuiltin -fno-math-errno -fcommon -fpascal-strings -fno-asm -fno-blocks -fno-builtin -fmath-errno -fno-common -fno-pascal-strings -fno-show-source-location -fshort-enums %s 2>&1 | FileCheck -check-prefix=CHECK-OPTIONS2 %s | ||||
// CHECK-OPTIONS1: -split-stacks | // CHECK-OPTIONS1: -split-stacks | ||||
// CHECK-OPTIONS1: -fgnu-keywords | // CHECK-OPTIONS1: -fgnu-keywords | ||||
// CHECK-OPTIONS1: -fblocks | // CHECK-OPTIONS1: -fblocks | ||||
// CHECK-OPTIONS1: -fpascal-strings | // CHECK-OPTIONS1: -fpascal-strings | ||||
// CHECK-OPTIONS2: -fmath-errno | // CHECK-OPTIONS2: -fmath-errno | ||||
// CHECK-OPTIONS2: -fno-gnu-keywords | // CHECK-OPTIONS2: -fno-gnu-keywords | ||||
// CHECK-OPTIONS2: -fno-builtin | // CHECK-OPTIONS2: -fno-builtin | ||||
// CHECK-OPTIONS2: -fshort-enums | // CHECK-OPTIONS2: -fshort-enums | ||||
// CHECK-OPTIONS2-NOT: -fcommon | // CHECK-OPTIONS2-NOT: -fcommon | ||||
// CHECK-OPTIONS2: -fno-show-source-location | // CHECK-OPTIONS2: -fno-show-source-location | ||||
// RUN: %clang -### -S -Wwrite-strings %s 2>&1 | FileCheck -check-prefix=WRITE-STRINGS1 %s | // RUN: %clang_bin -### -S -Wwrite-strings %s 2>&1 | FileCheck -check-prefix=WRITE-STRINGS1 %s | ||||
// WRITE-STRINGS1: -fconst-strings | // WRITE-STRINGS1: -fconst-strings | ||||
// RUN: %clang -### -S -Wwrite-strings -Wno-write-strings %s 2>&1 | FileCheck -check-prefix=WRITE-STRINGS2 %s | // RUN: %clang_bin -### -S -Wwrite-strings -Wno-write-strings %s 2>&1 | FileCheck -check-prefix=WRITE-STRINGS2 %s | ||||
// WRITE-STRINGS2-NOT: -fconst-strings | // WRITE-STRINGS2-NOT: -fconst-strings | ||||
// RUN: %clang -### -S -Wwrite-strings -w %s 2>&1 | FileCheck -check-prefix=WRITE-STRINGS3 %s | // RUN: %clang_bin -### -S -Wwrite-strings -w %s 2>&1 | FileCheck -check-prefix=WRITE-STRINGS3 %s | ||||
// WRITE-STRINGS3-NOT: -fconst-strings | // WRITE-STRINGS3-NOT: -fconst-strings | ||||
// RUN: %clang -### -x c++ -c %s 2>&1 | FileCheck -check-prefix=DEPRECATED-ON-CHECK %s | // RUN: %clang_bin -### -x c++ -c %s 2>&1 | FileCheck -check-prefix=DEPRECATED-ON-CHECK %s | ||||
// RUN: %clang -### -x c++ -c -Wdeprecated %s 2>&1 | FileCheck -check-prefix=DEPRECATED-ON-CHECK %s | // RUN: %clang_bin -### -x c++ -c -Wdeprecated %s 2>&1 | FileCheck -check-prefix=DEPRECATED-ON-CHECK %s | ||||
// RUN: %clang -### -x c++ -c -Wno-deprecated %s 2>&1 | FileCheck -check-prefix=DEPRECATED-OFF-CHECK %s | // RUN: %clang_bin -### -x c++ -c -Wno-deprecated %s 2>&1 | FileCheck -check-prefix=DEPRECATED-OFF-CHECK %s | ||||
// RUN: %clang -### -x c++ -c -Wno-deprecated -Wdeprecated %s 2>&1 | FileCheck -check-prefix=DEPRECATED-ON-CHECK %s | // RUN: %clang_bin -### -x c++ -c -Wno-deprecated -Wdeprecated %s 2>&1 | FileCheck -check-prefix=DEPRECATED-ON-CHECK %s | ||||
// RUN: %clang -### -x c++ -c -w %s 2>&1 | FileCheck -check-prefix=DEPRECATED-ON-CHECK %s | // RUN: %clang_bin -### -x c++ -c -w %s 2>&1 | FileCheck -check-prefix=DEPRECATED-ON-CHECK %s | ||||
// RUN: %clang -### -c %s 2>&1 | FileCheck -check-prefix=DEPRECATED-OFF-CHECK %s | // RUN: %clang_bin -### -c %s 2>&1 | FileCheck -check-prefix=DEPRECATED-OFF-CHECK %s | ||||
// RUN: %clang -### -c -Wdeprecated %s 2>&1 | FileCheck -check-prefix=DEPRECATED-OFF-CHECK %s | // RUN: %clang_bin -### -c -Wdeprecated %s 2>&1 | FileCheck -check-prefix=DEPRECATED-OFF-CHECK %s | ||||
// DEPRECATED-ON-CHECK: -fdeprecated-macro | // DEPRECATED-ON-CHECK: -fdeprecated-macro | ||||
// DEPRECATED-OFF-CHECK-NOT: -fdeprecated-macro | // DEPRECATED-OFF-CHECK-NOT: -fdeprecated-macro | ||||
// RUN: %clang -### -S -ffp-contract=fast %s 2>&1 | FileCheck -check-prefix=FP-CONTRACT-FAST-CHECK %s | // RUN: %clang_bin -### -S -ffp-contract=fast %s 2>&1 | FileCheck -check-prefix=FP-CONTRACT-FAST-CHECK %s | ||||
// RUN: %clang -### -S -ffast-math %s 2>&1 | FileCheck -check-prefix=FP-CONTRACT-FAST-CHECK %s | // RUN: %clang_bin -### -S -ffast-math %s 2>&1 | FileCheck -check-prefix=FP-CONTRACT-FAST-CHECK %s | ||||
// RUN: %clang -### -S -ffp-contract=off %s 2>&1 | FileCheck -check-prefix=FP-CONTRACT-OFF-CHECK %s | // RUN: %clang_bin -### -S -ffp-contract=off %s 2>&1 | FileCheck -check-prefix=FP-CONTRACT-OFF-CHECK %s | ||||
// FP-CONTRACT-FAST-CHECK: -ffp-contract=fast | // FP-CONTRACT-FAST-CHECK: -ffp-contract=fast | ||||
// FP-CONTRACT-OFF-CHECK: -ffp-contract=off | // FP-CONTRACT-OFF-CHECK: -ffp-contract=off | ||||
// RUN: %clang -### -S -funroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-UNROLL-LOOPS %s | // RUN: %clang_bin -### -S -funroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-UNROLL-LOOPS %s | ||||
// RUN: %clang -### -S -fno-unroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-NO-UNROLL-LOOPS %s | // RUN: %clang_bin -### -S -fno-unroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-NO-UNROLL-LOOPS %s | ||||
// RUN: %clang -### -S -fno-unroll-loops -funroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-UNROLL-LOOPS %s | // RUN: %clang_bin -### -S -fno-unroll-loops -funroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-UNROLL-LOOPS %s | ||||
// RUN: %clang -### -S -funroll-loops -fno-unroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-NO-UNROLL-LOOPS %s | // RUN: %clang_bin -### -S -funroll-loops -fno-unroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-NO-UNROLL-LOOPS %s | ||||
// CHECK-UNROLL-LOOPS: "-funroll-loops" | // CHECK-UNROLL-LOOPS: "-funroll-loops" | ||||
// CHECK-NO-UNROLL-LOOPS: "-fno-unroll-loops" | // CHECK-NO-UNROLL-LOOPS: "-fno-unroll-loops" | ||||
// RUN: %clang -### -S -freroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-REROLL-LOOPS %s | // RUN: %clang_bin -### -S -freroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-REROLL-LOOPS %s | ||||
// RUN: %clang -### -S -fno-reroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-NO-REROLL-LOOPS %s | // RUN: %clang_bin -### -S -fno-reroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-NO-REROLL-LOOPS %s | ||||
// RUN: %clang -### -S -fno-reroll-loops -freroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-REROLL-LOOPS %s | // RUN: %clang_bin -### -S -fno-reroll-loops -freroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-REROLL-LOOPS %s | ||||
// RUN: %clang -### -S -freroll-loops -fno-reroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-NO-REROLL-LOOPS %s | // RUN: %clang_bin -### -S -freroll-loops -fno-reroll-loops %s 2>&1 | FileCheck -check-prefix=CHECK-NO-REROLL-LOOPS %s | ||||
// CHECK-REROLL-LOOPS: "-freroll-loops" | // CHECK-REROLL-LOOPS: "-freroll-loops" | ||||
// CHECK-NO-REROLL-LOOPS-NOT: "-freroll-loops" | // CHECK-NO-REROLL-LOOPS-NOT: "-freroll-loops" | ||||
// RUN: %clang -### -S -fprofile-sample-accurate %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-SAMPLE-ACCURATE %s | // RUN: %clang_bin -### -S -fprofile-sample-accurate %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-SAMPLE-ACCURATE %s | ||||
// CHECK-PROFILE-SAMPLE-ACCURATE: "-fprofile-sample-accurate" | // CHECK-PROFILE-SAMPLE-ACCURATE: "-fprofile-sample-accurate" | ||||
// RUN: %clang -### -S -fprofile-sample-use=%S/Inputs/file.prof %s 2>&1 | FileCheck -check-prefix=CHECK-SAMPLE-PROFILE %s | // RUN: %clang_bin -### -S -fprofile-sample-use=%S/Inputs/file.prof %s 2>&1 | FileCheck -check-prefix=CHECK-SAMPLE-PROFILE %s | ||||
// CHECK-SAMPLE-PROFILE: "-fprofile-sample-use={{.*}}/file.prof" | // CHECK-SAMPLE-PROFILE: "-fprofile-sample-use={{.*}}/file.prof" | ||||
// RUN: %clang -### -S -fauto-profile=%S/Inputs/file.prof %s 2>&1 | FileCheck -check-prefix=CHECK-AUTO-PROFILE %s | // RUN: %clang_bin -### -S -fauto-profile=%S/Inputs/file.prof %s 2>&1 | FileCheck -check-prefix=CHECK-AUTO-PROFILE %s | ||||
// CHECK-AUTO-PROFILE: "-fprofile-sample-use={{.*}}/file.prof" | // CHECK-AUTO-PROFILE: "-fprofile-sample-use={{.*}}/file.prof" | ||||
// RUN: %clang -### -S -fauto-profile=%S/Inputs/file.prof -fno-profile-sample-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-AUTO-PROFILE %s | // RUN: %clang_bin -### -S -fauto-profile=%S/Inputs/file.prof -fno-profile-sample-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-AUTO-PROFILE %s | ||||
// RUN: %clang -### -S -fauto-profile=%S/Inputs/file.prof -fno-auto-profile %s 2>&1 | FileCheck -check-prefix=CHECK-NO-AUTO-PROFILE %s | // RUN: %clang_bin -### -S -fauto-profile=%S/Inputs/file.prof -fno-auto-profile %s 2>&1 | FileCheck -check-prefix=CHECK-NO-AUTO-PROFILE %s | ||||
// CHECK-NO-AUTO-PROFILE-NOT: "-fprofile-sample-use={{.*}}/file.prof" | // CHECK-NO-AUTO-PROFILE-NOT: "-fprofile-sample-use={{.*}}/file.prof" | ||||
// RUN: %clang -### -S -fauto-profile=%S/Inputs/file.prof -fno-profile-sample-use -fauto-profile %s 2>&1 | FileCheck -check-prefix=CHECK-AUTO-PROFILE %s | // RUN: %clang_bin -### -S -fauto-profile=%S/Inputs/file.prof -fno-profile-sample-use -fauto-profile %s 2>&1 | FileCheck -check-prefix=CHECK-AUTO-PROFILE %s | ||||
// RUN: %clang -### -S -fauto-profile=%S/Inputs/file.prof -fno-auto-profile -fprofile-sample-use %s 2>&1 | FileCheck -check-prefix=CHECK-AUTO-PROFILE %s | // RUN: %clang_bin -### -S -fauto-profile=%S/Inputs/file.prof -fno-auto-profile -fprofile-sample-use %s 2>&1 | FileCheck -check-prefix=CHECK-AUTO-PROFILE %s | ||||
// RUN: %clang -### -S -fprofile-generate %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-GENERATE-LLVM %s | // RUN: %clang_bin -### -S -fprofile-generate %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-GENERATE-LLVM %s | ||||
// RUN: %clang -### -S -fprofile-instr-generate %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-GENERATE %s | // RUN: %clang_bin -### -S -fprofile-instr-generate %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-GENERATE %s | ||||
// RUN: %clang -### -S -fprofile-generate=/some/dir %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-GENERATE-DIR %s | // RUN: %clang_bin -### -S -fprofile-generate=/some/dir %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-GENERATE-DIR %s | ||||
// RUN: %clang -### -S -fprofile-instr-generate=/tmp/somefile.profraw %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-GENERATE-FILE %s | // RUN: %clang_bin -### -S -fprofile-instr-generate=/tmp/somefile.profraw %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-GENERATE-FILE %s | ||||
// RUN: %clang -### -S -fprofile-generate -fprofile-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s | // RUN: %clang_bin -### -S -fprofile-generate -fprofile-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s | ||||
// RUN: %clang -### -S -fprofile-generate -fprofile-use=dir %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s | // RUN: %clang_bin -### -S -fprofile-generate -fprofile-use=dir %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s | ||||
// RUN: %clang -### -S -fprofile-generate -fprofile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s | // RUN: %clang_bin -### -S -fprofile-generate -fprofile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s | ||||
// RUN: %clang -### -S -fprofile-generate -fprofile-instr-use=file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s | // RUN: %clang_bin -### -S -fprofile-generate -fprofile-instr-use=file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s | ||||
// RUN: %clang -### -S -fprofile-instr-generate -fprofile-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s | // RUN: %clang_bin -### -S -fprofile-instr-generate -fprofile-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s | ||||
// RUN: %clang -### -S -fprofile-instr-generate -fprofile-use=dir %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s | // RUN: %clang_bin -### -S -fprofile-instr-generate -fprofile-use=dir %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s | ||||
// RUN: %clang -### -S -fprofile-instr-generate -fprofile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s | // RUN: %clang_bin -### -S -fprofile-instr-generate -fprofile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s | ||||
// RUN: %clang -### -S -fprofile-instr-generate -fprofile-instr-use=file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s | // RUN: %clang_bin -### -S -fprofile-instr-generate -fprofile-instr-use=file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s | ||||
// RUN: %clang -### -S -fprofile-instr-generate=file -fprofile-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s | // RUN: %clang_bin -### -S -fprofile-instr-generate=file -fprofile-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s | ||||
// RUN: %clang -### -S -fprofile-instr-generate=file -fprofile-use=dir %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s | // RUN: %clang_bin -### -S -fprofile-instr-generate=file -fprofile-use=dir %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s | ||||
// RUN: %clang -### -S -fprofile-instr-generate=file -fprofile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s | // RUN: %clang_bin -### -S -fprofile-instr-generate=file -fprofile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s | ||||
// RUN: %clang -### -S -fprofile-instr-generate=file -fprofile-instr-use=file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s | // RUN: %clang_bin -### -S -fprofile-instr-generate=file -fprofile-instr-use=file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s | ||||
// RUN: %clang -### -S -fprofile-generate=dir -fprofile-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s | // RUN: %clang_bin -### -S -fprofile-generate=dir -fprofile-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s | ||||
// RUN: %clang -### -S -fprofile-generate=dir -fprofile-use=dir %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s | // RUN: %clang_bin -### -S -fprofile-generate=dir -fprofile-use=dir %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s | ||||
// RUN: %clang -### -S -fprofile-generate=dir -fprofile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s | // RUN: %clang_bin -### -S -fprofile-generate=dir -fprofile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s | ||||
// RUN: %clang -### -S -fprofile-generate=dir -fprofile-instr-use=file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s | // RUN: %clang_bin -### -S -fprofile-generate=dir -fprofile-instr-use=file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s | ||||
// RUN: %clang -### -S -fprofile-instr-generate=file -fno-profile-instr-generate %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-GEN %s | // RUN: %clang_bin -### -S -fprofile-instr-generate=file -fno-profile-instr-generate %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-GEN %s | ||||
// RUN: %clang -### -S -fprofile-instr-generate -fprofile-generate %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GENERATE %s | // RUN: %clang_bin -### -S -fprofile-instr-generate -fprofile-generate %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GENERATE %s | ||||
// RUN: %clang -### -S -fprofile-instr-generate -fprofile-generate=file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GENERATE %s | // RUN: %clang_bin -### -S -fprofile-instr-generate -fprofile-generate=file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GENERATE %s | ||||
// RUN: %clang -### -S -fprofile-generate=dir -fno-profile-generate %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-GEN %s | // RUN: %clang_bin -### -S -fprofile-generate=dir -fno-profile-generate %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-GEN %s | ||||
// RUN: %clang -### -S -fprofile-instr-use=file -fno-profile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-USE %s | // RUN: %clang_bin -### -S -fprofile-instr-use=file -fno-profile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-USE %s | ||||
// RUN: %clang -### -S -fprofile-instr-use=file -fno-profile-use %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-USE %s | // RUN: %clang_bin -### -S -fprofile-instr-use=file -fno-profile-use %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-USE %s | ||||
// RUN: %clang -### -S -fprofile-use=file -fno-profile-use %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-USE %s | // RUN: %clang_bin -### -S -fprofile-use=file -fno-profile-use %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-USE %s | ||||
// RUN: %clang -### -S -fprofile-use=file -fno-profile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-USE %s | // RUN: %clang_bin -### -S -fprofile-use=file -fno-profile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-USE %s | ||||
// RUN: %clang -### -S -fcoverage-mapping %s 2>&1 | FileCheck -check-prefix=CHECK-COVERAGE-AND-GEN %s | // RUN: %clang_bin -### -S -fcoverage-mapping %s 2>&1 | FileCheck -check-prefix=CHECK-COVERAGE-AND-GEN %s | ||||
// RUN: %clang -### -S -fcoverage-mapping -fno-coverage-mapping %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-COVERAGE %s | // RUN: %clang_bin -### -S -fcoverage-mapping -fno-coverage-mapping %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-COVERAGE %s | ||||
// RUN: %clang -### -S -fprofile-instr-generate -fcoverage-mapping -fno-coverage-mapping %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-COVERAGE %s | // RUN: %clang_bin -### -S -fprofile-instr-generate -fcoverage-mapping -fno-coverage-mapping %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-COVERAGE %s | ||||
// RUN: %clang -### -S -fprofile-remapping-file foo/bar.txt %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-REMAP %s | // RUN: %clang_bin -### -S -fprofile-remapping-file foo/bar.txt %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-REMAP %s | ||||
// RUN: %clang -### -S -forder-file-instrumentation %s 2>&1 | FileCheck -check-prefix=CHECK-ORDERFILE-INSTR %s | // RUN: %clang_bin -### -S -forder-file-instrumentation %s 2>&1 | FileCheck -check-prefix=CHECK-ORDERFILE-INSTR %s | ||||
// RUN: %clang -### -flto -forder-file-instrumentation %s 2>&1 | FileCheck -check-prefix=CHECK-ORDERFILE-INSTR-LTO %s | // RUN: %clang_bin -### -flto -forder-file-instrumentation %s 2>&1 | FileCheck -check-prefix=CHECK-ORDERFILE-INSTR-LTO %s | ||||
// CHECK-PROFILE-GENERATE: "-fprofile-instrument=clang" | // CHECK-PROFILE-GENERATE: "-fprofile-instrument=clang" | ||||
// CHECK-PROFILE-GENERATE-LLVM: "-fprofile-instrument=llvm" | // CHECK-PROFILE-GENERATE-LLVM: "-fprofile-instrument=llvm" | ||||
// CHECK-PROFILE-GENERATE-DIR: "-fprofile-instrument-path=/some/dir{{/|\\\\}}{{.*}}" | // CHECK-PROFILE-GENERATE-DIR: "-fprofile-instrument-path=/some/dir{{/|\\\\}}{{.*}}" | ||||
// CHECK-PROFILE-GENERATE-FILE: "-fprofile-instrument-path=/tmp/somefile.profraw" | // CHECK-PROFILE-GENERATE-FILE: "-fprofile-instrument-path=/tmp/somefile.profraw" | ||||
// CHECK-NO-MIX-GEN-USE: '{{[a-z=-]*}}' not allowed with '{{[a-z=-]*}}' | // CHECK-NO-MIX-GEN-USE: '{{[a-z=-]*}}' not allowed with '{{[a-z=-]*}}' | ||||
// CHECK-NO-MIX-GENERATE: '{{[a-z=-]*}}' not allowed with '{{[a-z=-]*}}' | // CHECK-NO-MIX-GENERATE: '{{[a-z=-]*}}' not allowed with '{{[a-z=-]*}}' | ||||
// CHECK-DISABLE-GEN-NOT: "-fprofile-instrument=clang" | // CHECK-DISABLE-GEN-NOT: "-fprofile-instrument=clang" | ||||
// CHECK-DISABLE-USE-NOT: "-fprofile-instr-use" | // CHECK-DISABLE-USE-NOT: "-fprofile-instr-use" | ||||
// CHECK-COVERAGE-AND-GEN: '-fcoverage-mapping' only allowed with '-fprofile-instr-generate' | // CHECK-COVERAGE-AND-GEN: '-fcoverage-mapping' only allowed with '-fprofile-instr-generate' | ||||
// CHECK-DISABLE-COVERAGE-NOT: "-fcoverage-mapping" | // CHECK-DISABLE-COVERAGE-NOT: "-fcoverage-mapping" | ||||
// CHECK-PROFILE-REMAP: "-fprofile-remapping-file=foo/bar.txt" | // CHECK-PROFILE-REMAP: "-fprofile-remapping-file=foo/bar.txt" | ||||
// CHECK-ORDERFILE-INSTR: "-forder-file-instrumentation" | // CHECK-ORDERFILE-INSTR: "-forder-file-instrumentation" | ||||
// CHECK-ORDERFILE-INSTR: "-enable-order-file-instrumentation" | // CHECK-ORDERFILE-INSTR: "-enable-order-file-instrumentation" | ||||
// CHECK-ORDERFILE-INSTR-LTO: "-forder-file-instrumentation" | // CHECK-ORDERFILE-INSTR-LTO: "-forder-file-instrumentation" | ||||
// CHECK-ORDERFILE-INSTR-LTO-NOT: "-enable-order-file-instrumentation" | // CHECK-ORDERFILE-INSTR-LTO-NOT: "-enable-order-file-instrumentation" | ||||
// RUN: %clang -### -S -fprofile-use %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-USE %s | // RUN: %clang_bin -### -S -fprofile-use %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-USE %s | ||||
// RUN: %clang -### -S -fprofile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-USE %s | // RUN: %clang_bin -### -S -fprofile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-USE %s | ||||
// RUN: mkdir -p %t.d/some/dir | // RUN: mkdir -p %t.d/some/dir | ||||
// RUN: %clang -### -S -fprofile-use=%t.d/some/dir %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-USE-DIR %s | // RUN: %clang_bin -### -S -fprofile-use=%t.d/some/dir %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-USE-DIR %s | ||||
// RUN: %clang -### -S -fprofile-instr-use=/tmp/somefile.prof %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-USE-FILE %s | // RUN: %clang_bin -### -S -fprofile-instr-use=/tmp/somefile.prof %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-USE-FILE %s | ||||
// CHECK-PROFILE-USE: "-fprofile-instrument-use-path=default.profdata" | // CHECK-PROFILE-USE: "-fprofile-instrument-use-path=default.profdata" | ||||
// CHECK-PROFILE-USE-DIR: "-fprofile-instrument-use-path={{.*}}.d/some/dir{{/|\\\\}}default.profdata" | // CHECK-PROFILE-USE-DIR: "-fprofile-instrument-use-path={{.*}}.d/some/dir{{/|\\\\}}default.profdata" | ||||
// CHECK-PROFILE-USE-FILE: "-fprofile-instrument-use-path=/tmp/somefile.prof" | // CHECK-PROFILE-USE-FILE: "-fprofile-instrument-use-path=/tmp/somefile.prof" | ||||
// RUN: %clang -### -S -fvectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s | // RUN: %clang_bin -### -S -fvectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s | ||||
// RUN: %clang -### -S -fno-vectorize -fvectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s | // RUN: %clang_bin -### -S -fno-vectorize -fvectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s | ||||
// RUN: %clang -### -S -fno-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s | // RUN: %clang_bin -### -S -fno-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s | ||||
// RUN: %clang -### -S -fvectorize -fno-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s | // RUN: %clang_bin -### -S -fvectorize -fno-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s | ||||
// RUN: %clang -### -S -ftree-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s | // RUN: %clang_bin -### -S -ftree-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s | ||||
// RUN: %clang -### -S -fno-tree-vectorize -fvectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s | // RUN: %clang_bin -### -S -fno-tree-vectorize -fvectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s | ||||
// RUN: %clang -### -S -fno-tree-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s | // RUN: %clang_bin -### -S -fno-tree-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s | ||||
// RUN: %clang -### -S -ftree-vectorize -fno-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s | // RUN: %clang_bin -### -S -ftree-vectorize -fno-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s | ||||
// RUN: %clang -### -S -O %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s | // RUN: %clang_bin -### -S -O %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s | ||||
// RUN: %clang -### -S -O2 %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s | // RUN: %clang_bin -### -S -O2 %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s | ||||
// RUN: %clang -### -S -Os %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s | // RUN: %clang_bin -### -S -Os %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s | ||||
// RUN: %clang -### -S -O3 %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s | // RUN: %clang_bin -### -S -O3 %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s | ||||
// RUN: %clang -### -S -fno-vectorize -O3 %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s | // RUN: %clang_bin -### -S -fno-vectorize -O3 %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s | ||||
// RUN: %clang -### -S -O1 -fvectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s | // RUN: %clang_bin -### -S -O1 -fvectorize %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s | ||||
// RUN: %clang -### -S -Ofast %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s | // RUN: %clang_bin -### -S -Ofast %s 2>&1 | FileCheck -check-prefix=CHECK-VECTORIZE %s | ||||
// RUN: %clang -### -S %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s | // RUN: %clang_bin -### -S %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s | ||||
// RUN: %clang -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s | // RUN: %clang_bin -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s | ||||
// RUN: %clang -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s | // RUN: %clang_bin -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s | ||||
// RUN: %clang -### -S -Oz %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s | // RUN: %clang_bin -### -S -Oz %s 2>&1 | FileCheck -check-prefix=CHECK-NO-VECTORIZE %s | ||||
// CHECK-VECTORIZE: "-vectorize-loops" | // CHECK-VECTORIZE: "-vectorize-loops" | ||||
// CHECK-NO-VECTORIZE-NOT: "-vectorize-loops" | // CHECK-NO-VECTORIZE-NOT: "-vectorize-loops" | ||||
// RUN: %clang -### -S -fslp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s | // RUN: %clang_bin -### -S -fslp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s | ||||
// RUN: %clang -### -S -fno-slp-vectorize -fslp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s | // RUN: %clang_bin -### -S -fno-slp-vectorize -fslp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s | ||||
// RUN: %clang -### -S -fno-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s | // RUN: %clang_bin -### -S -fno-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s | ||||
// RUN: %clang -### -S -fslp-vectorize -fno-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s | // RUN: %clang_bin -### -S -fslp-vectorize -fno-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s | ||||
// RUN: %clang -### -S -ftree-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s | // RUN: %clang_bin -### -S -ftree-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s | ||||
// RUN: %clang -### -S -fno-tree-slp-vectorize -fslp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s | // RUN: %clang_bin -### -S -fno-tree-slp-vectorize -fslp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s | ||||
// RUN: %clang -### -S -fno-tree-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s | // RUN: %clang_bin -### -S -fno-tree-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s | ||||
// RUN: %clang -### -S -ftree-slp-vectorize -fno-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s | // RUN: %clang_bin -### -S -ftree-slp-vectorize -fno-slp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s | ||||
// RUN: %clang -### -S -O %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s | // RUN: %clang_bin -### -S -O %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s | ||||
// RUN: %clang -### -S -O2 %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s | // RUN: %clang_bin -### -S -O2 %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s | ||||
// RUN: %clang -### -S -Os %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s | // RUN: %clang_bin -### -S -Os %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s | ||||
// RUN: %clang -### -S -Oz %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s | // RUN: %clang_bin -### -S -Oz %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s | ||||
// RUN: %clang -### -S -O3 %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s | // RUN: %clang_bin -### -S -O3 %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s | ||||
// RUN: %clang -### -S -fno-slp-vectorize -O3 %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s | // RUN: %clang_bin -### -S -fno-slp-vectorize -O3 %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s | ||||
// RUN: %clang -### -S -O1 -fslp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s | // RUN: %clang_bin -### -S -O1 -fslp-vectorize %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s | ||||
// RUN: %clang -### -S -Ofast %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s | // RUN: %clang_bin -### -S -Ofast %s 2>&1 | FileCheck -check-prefix=CHECK-SLP-VECTORIZE %s | ||||
// RUN: %clang -### -S %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s | // RUN: %clang_bin -### -S %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s | ||||
// RUN: %clang -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s | // RUN: %clang_bin -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s | ||||
// RUN: %clang -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s | // RUN: %clang_bin -### -S -O1 %s 2>&1 | FileCheck -check-prefix=CHECK-NO-SLP-VECTORIZE %s | ||||
// CHECK-SLP-VECTORIZE: "-vectorize-slp" | // CHECK-SLP-VECTORIZE: "-vectorize-slp" | ||||
// CHECK-NO-SLP-VECTORIZE-NOT: "-vectorize-slp" | // CHECK-NO-SLP-VECTORIZE-NOT: "-vectorize-slp" | ||||
// RUN: %clang -### -S -fextended-identifiers %s 2>&1 | FileCheck -check-prefix=CHECK-EXTENDED-IDENTIFIERS %s | // RUN: %clang_bin -### -S -fextended-identifiers %s 2>&1 | FileCheck -check-prefix=CHECK-EXTENDED-IDENTIFIERS %s | ||||
// RUN: not %clang -### -S -fno-extended-identifiers %s 2>&1 | FileCheck -check-prefix=CHECK-NO-EXTENDED-IDENTIFIERS %s | // RUN: not %clang -### -S -fno-extended-identifiers %s 2>&1 | FileCheck -check-prefix=CHECK-NO-EXTENDED-IDENTIFIERS %s | ||||
// CHECK-EXTENDED-IDENTIFIERS: "-cc1" | // CHECK-EXTENDED-IDENTIFIERS: "-cc1" | ||||
// CHECK-EXTENDED-IDENTIFIERS-NOT: "-fextended-identifiers" | // CHECK-EXTENDED-IDENTIFIERS-NOT: "-fextended-identifiers" | ||||
// CHECK-NO-EXTENDED-IDENTIFIERS: error: unsupported option '-fno-extended-identifiers' | // CHECK-NO-EXTENDED-IDENTIFIERS: error: unsupported option '-fno-extended-identifiers' | ||||
// RUN: %clang -### -S -frounding-math %s 2>&1 | FileCheck -check-prefix=CHECK-ROUNDING-MATH %s | // RUN: %clang_bin -### -S -frounding-math %s 2>&1 | FileCheck -check-prefix=CHECK-ROUNDING-MATH %s | ||||
// CHECK-ROUNDING-MATH: "-cc1" | // CHECK-ROUNDING-MATH: "-cc1" | ||||
// CHECK-ROUNDING-MATH: "-frounding-math" | // CHECK-ROUNDING-MATH: "-frounding-math" | ||||
// CHECK-ROUNDING-MATH-NOT: "-fno-rounding-math" | // CHECK-ROUNDING-MATH-NOT: "-fno-rounding-math" | ||||
// RUN: %clang -### -S %s 2>&1 | FileCheck -check-prefix=CHECK-ROUNDING-MATH-NOT %s | // RUN: %clang_bin -### -S %s 2>&1 | FileCheck -check-prefix=CHECK-ROUNDING-MATH-NOT %s | ||||
// RUN: %clang -### -S -ffp-model=imprecise %s 2>&1 | FileCheck -check-prefix=CHECK-FPMODEL %s | // RUN: %clang_bin -### -S -ffp-model=imprecise %s 2>&1 | FileCheck -check-prefix=CHECK-FPMODEL %s | ||||
// CHECK-FPMODEL: unsupported argument 'imprecise' to option 'ffp-model=' | // CHECK-FPMODEL: unsupported argument 'imprecise' to option 'ffp-model=' | ||||
// RUN: %clang -### -S -ffp-model=precise %s 2>&1 | FileCheck -check-prefix=IGNORE %s | // RUN: %clang_bin -### -S -ffp-model=precise %s 2>&1 | FileCheck -check-prefix=IGNORE %s | ||||
// RUN: %clang -### -S -ffp-model=strict %s 2>&1 | FileCheck -check-prefix=IGNORE %s | // RUN: %clang_bin -### -S -ffp-model=strict %s 2>&1 | FileCheck -check-prefix=IGNORE %s | ||||
// RUN: %clang -### -S -ffp-model=fast %s 2>&1 | FileCheck -check-prefix=IGNORE %s | // RUN: %clang_bin -### -S -ffp-model=fast %s 2>&1 | FileCheck -check-prefix=IGNORE %s | ||||
// RUN: %clang -### -S -ffp-exception-behavior=trap %s 2>&1 | FileCheck -check-prefix=CHECK-FPEB %s | // RUN: %clang_bin -### -S -ffp-exception-behavior=trap %s 2>&1 | FileCheck -check-prefix=CHECK-FPEB %s | ||||
// CHECK-FPEB: unsupported argument 'trap' to option 'ffp-exception-behavior=' | // CHECK-FPEB: unsupported argument 'trap' to option 'ffp-exception-behavior=' | ||||
// RUN: %clang -### -S -ffp-exception-behavior=maytrap %s 2>&1 | FileCheck -check-prefix=IGNORE %s | // RUN: %clang_bin -### -S -ffp-exception-behavior=maytrap %s 2>&1 | FileCheck -check-prefix=IGNORE %s | ||||
// RUN: %clang -### -S -ffp-exception-behavior=ignore %s 2>&1 | FileCheck -check-prefix=IGNORE %s | // RUN: %clang_bin -### -S -ffp-exception-behavior=ignore %s 2>&1 | FileCheck -check-prefix=IGNORE %s | ||||
// RUN: %clang -### -S -ffp-exception-behavior=strict %s 2>&1 | FileCheck -check-prefix=IGNORE %s | // RUN: %clang_bin -### -S -ffp-exception-behavior=strict %s 2>&1 | FileCheck -check-prefix=IGNORE %s | ||||
// RUN: %clang -### -S -fno-pascal-strings -mpascal-strings %s 2>&1 | FileCheck -check-prefix=CHECK-M-PASCAL-STRINGS %s | // RUN: %clang_bin -### -S -fno-pascal-strings -mpascal-strings %s 2>&1 | FileCheck -check-prefix=CHECK-M-PASCAL-STRINGS %s | ||||
// CHECK-M-PASCAL-STRINGS: "-fpascal-strings" | // CHECK-M-PASCAL-STRINGS: "-fpascal-strings" | ||||
// RUN: %clang -### -S -fpascal-strings -mno-pascal-strings %s 2>&1 | FileCheck -check-prefix=CHECK-NO-M-PASCAL-STRINGS %s | // RUN: %clang_bin -### -S -fpascal-strings -mno-pascal-strings %s 2>&1 | FileCheck -check-prefix=CHECK-NO-M-PASCAL-STRINGS %s | ||||
// CHECK-NO-M-PASCAL-STRINGS-NOT: "-fpascal-strings" | // CHECK-NO-M-PASCAL-STRINGS-NOT: "-fpascal-strings" | ||||
// RUN: %clang -### -S -O4 %s 2>&1 | FileCheck -check-prefix=CHECK-MAX-O %s | // RUN: %clang_bin -### -S -O4 %s 2>&1 | FileCheck -check-prefix=CHECK-MAX-O %s | ||||
// CHECK-MAX-O: warning: -O4 is equivalent to -O3 | // CHECK-MAX-O: warning: -O4 is equivalent to -O3 | ||||
// CHECK-MAX-O: -O3 | // CHECK-MAX-O: -O3 | ||||
// RUN: %clang -S -O20 -o /dev/null %s 2>&1 | FileCheck -check-prefix=CHECK-INVALID-O %s | // RUN: %clang_bin -S -O20 -o /dev/null %s 2>&1 | FileCheck -check-prefix=CHECK-INVALID-O %s | ||||
// CHECK-INVALID-O: warning: optimization level '-O20' is not supported; using '-O3' instead | // CHECK-INVALID-O: warning: optimization level '-O20' is not supported; using '-O3' instead | ||||
// RUN: %clang -### -S -finput-charset=iso-8859-1 -o /dev/null %s 2>&1 | FileCheck -check-prefix=CHECK-INVALID-CHARSET %s | // RUN: %clang_bin -### -S -finput-charset=iso-8859-1 -o /dev/null %s 2>&1 | FileCheck -check-prefix=CHECK-INVALID-CHARSET %s | ||||
// CHECK-INVALID-CHARSET: error: invalid value 'iso-8859-1' in '-finput-charset=iso-8859-1' | // CHECK-INVALID-CHARSET: error: invalid value 'iso-8859-1' in '-finput-charset=iso-8859-1' | ||||
// RUN: %clang -### -S -fexec-charset=iso-8859-1 -o /dev/null %s 2>&1 | FileCheck -check-prefix=CHECK-INVALID-INPUT-CHARSET %s | // RUN: %clang_bin -### -S -fexec-charset=iso-8859-1 -o /dev/null %s 2>&1 | FileCheck -check-prefix=CHECK-INVALID-INPUT-CHARSET %s | ||||
// CHECK-INVALID-INPUT-CHARSET: error: invalid value 'iso-8859-1' in '-fexec-charset=iso-8859-1' | // CHECK-INVALID-INPUT-CHARSET: error: invalid value 'iso-8859-1' in '-fexec-charset=iso-8859-1' | ||||
// Test that we don't error on these. | // Test that we don't error on these. | ||||
// RUN: %clang -### -S -Werror \ | // RUN: %clang_bin -### -S -Werror \ | ||||
// RUN: -falign-functions -falign-functions=2 -fno-align-functions \ | // RUN: -falign-functions -falign-functions=2 -fno-align-functions \ | ||||
// RUN: -fasynchronous-unwind-tables -fno-asynchronous-unwind-tables \ | // RUN: -fasynchronous-unwind-tables -fno-asynchronous-unwind-tables \ | ||||
// RUN: -fbuiltin -fno-builtin \ | // RUN: -fbuiltin -fno-builtin \ | ||||
// RUN: -fdiagnostics-show-location=once \ | // RUN: -fdiagnostics-show-location=once \ | ||||
// RUN: -ffloat-store -fno-float-store \ | // RUN: -ffloat-store -fno-float-store \ | ||||
// RUN: -feliminate-unused-debug-types -fno-eliminate-unused-debug-types \ | // RUN: -feliminate-unused-debug-types -fno-eliminate-unused-debug-types \ | ||||
// RUN: -fgcse -fno-gcse \ | // RUN: -fgcse -fno-gcse \ | ||||
// RUN: -fident -fno-ident \ | // RUN: -fident -fno-ident \ | ||||
▲ Show 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | |||||
// RUN: -fforce-addr \ | // RUN: -fforce-addr \ | ||||
// RUN: -malign-functions=100 \ | // RUN: -malign-functions=100 \ | ||||
// RUN: -malign-loops=100 \ | // RUN: -malign-loops=100 \ | ||||
// RUN: -malign-jumps=100 \ | // RUN: -malign-jumps=100 \ | ||||
// RUN: %s 2>&1 | FileCheck --check-prefix=IGNORE %s | // RUN: %s 2>&1 | FileCheck --check-prefix=IGNORE %s | ||||
// IGNORE-NOT: error: unknown argument | // IGNORE-NOT: error: unknown argument | ||||
// Test that the warning is displayed on these. | // Test that the warning is displayed on these. | ||||
// RUN: %clang -### \ | // RUN: %clang_bin -### \ | ||||
// RUN: -finline-limit=1000 \ | // RUN: -finline-limit=1000 \ | ||||
// RUN: -finline-limit \ | // RUN: -finline-limit \ | ||||
// RUN: -fexpensive-optimizations \ | // RUN: -fexpensive-optimizations \ | ||||
// RUN: -fno-expensive-optimizations \ | // RUN: -fno-expensive-optimizations \ | ||||
// RUN: -fno-defer-pop \ | // RUN: -fno-defer-pop \ | ||||
// RUN: -fkeep-inline-functions \ | // RUN: -fkeep-inline-functions \ | ||||
// RUN: -fno-keep-inline-functions \ | // RUN: -fno-keep-inline-functions \ | ||||
// RUN: -freorder-blocks \ | // RUN: -freorder-blocks \ | ||||
▲ Show 20 Lines • Show All 107 Lines • ▼ Show 20 Lines | |||||
// CHECK-WARNING-DAG: optimization flag '-ftree-ter' is not supported | // CHECK-WARNING-DAG: optimization flag '-ftree-ter' is not supported | ||||
// CHECK-WARNING-DAG: optimization flag '-ftree-vrp' is not supported | // CHECK-WARNING-DAG: optimization flag '-ftree-vrp' is not supported | ||||
// CHECK-WARNING-DAG: optimization flag '-fno-devirtualize' is not supported | // CHECK-WARNING-DAG: optimization flag '-fno-devirtualize' is not supported | ||||
// CHECK-WARNING-DAG: optimization flag '-fno-devirtualize-speculatively' is not supported | // CHECK-WARNING-DAG: optimization flag '-fno-devirtualize-speculatively' is not supported | ||||
// CHECK-WARNING-DAG: the flag '-fslp-vectorize-aggressive' has been deprecated and will be ignored | // CHECK-WARNING-DAG: the flag '-fslp-vectorize-aggressive' has been deprecated and will be ignored | ||||
// CHECK-WARNING-DAG: the flag '-fno-slp-vectorize-aggressive' has been deprecated and will be ignored | // CHECK-WARNING-DAG: the flag '-fno-slp-vectorize-aggressive' has been deprecated and will be ignored | ||||
// Test that we mute the warning on these | // Test that we mute the warning on these | ||||
// RUN: %clang -### -finline-limit=1000 -Wno-invalid-command-line-argument \ | // RUN: %clang_bin -### -finline-limit=1000 -Wno-invalid-command-line-argument \ | ||||
// RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-NO-WARNING1 %s | // RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-NO-WARNING1 %s | ||||
// RUN: %clang -### -finline-limit -Wno-invalid-command-line-argument \ | // RUN: %clang_bin -### -finline-limit -Wno-invalid-command-line-argument \ | ||||
// RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-NO-WARNING2 %s | // RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-NO-WARNING2 %s | ||||
// RUN: %clang -### -finline-limit \ | // RUN: %clang_bin -### -finline-limit \ | ||||
// RUN: -Winvalid-command-line-argument -Wno-ignored-optimization-argument \ | // RUN: -Winvalid-command-line-argument -Wno-ignored-optimization-argument \ | ||||
// RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-NO-WARNING2 %s | // RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-NO-WARNING2 %s | ||||
// CHECK-NO-WARNING1-NOT: optimization flag '-finline-limit=1000' is not supported | // CHECK-NO-WARNING1-NOT: optimization flag '-finline-limit=1000' is not supported | ||||
// CHECK-NO-WARNING2-NOT: optimization flag '-finline-limit' is not supported | // CHECK-NO-WARNING2-NOT: optimization flag '-finline-limit' is not supported | ||||
// Test that an ignored optimization argument only prints 1 warning, | // Test that an ignored optimization argument only prints 1 warning, | ||||
// not both a warning about not claiming the arg, *and* about not supporting | // not both a warning about not claiming the arg, *and* about not supporting | ||||
// the arg; and that adding -Wno-ignored-optimization silences the warning. | // the arg; and that adding -Wno-ignored-optimization silences the warning. | ||||
// | // | ||||
// RUN: %clang -### -fprofile-correction %s 2>&1 \ | // RUN: %clang_bin -### -fprofile-correction %s 2>&1 \ | ||||
// RUN: | FileCheck --check-prefix=CHECK-NO-WARNING3 %s | // RUN: | FileCheck --check-prefix=CHECK-NO-WARNING3 %s | ||||
// CHECK-NO-WARNING3: optimization flag '-fprofile-correction' is not supported | // CHECK-NO-WARNING3: optimization flag '-fprofile-correction' is not supported | ||||
// CHECK-NO-WARNING3-NOT: argument unused | // CHECK-NO-WARNING3-NOT: argument unused | ||||
// RUN: %clang -### -fprofile-correction -Wno-ignored-optimization-argument %s 2>&1 \ | // RUN: %clang_bin -### -fprofile-correction -Wno-ignored-optimization-argument %s 2>&1 \ | ||||
// RUN: | FileCheck --check-prefix=CHECK-NO-WARNING4 %s | // RUN: | FileCheck --check-prefix=CHECK-NO-WARNING4 %s | ||||
// CHECK-NO-WARNING4-NOT: not supported | // CHECK-NO-WARNING4-NOT: not supported | ||||
// CHECK-NO-WARNING4-NOT: argument unused | // CHECK-NO-WARNING4-NOT: argument unused | ||||
// RUN: %clang -### -S -fsigned-char %s 2>&1 | FileCheck -check-prefix=CHAR-SIGN1 %s | // RUN: %clang_bin -### -S -fsigned-char %s 2>&1 | FileCheck -check-prefix=CHAR-SIGN1 %s | ||||
// CHAR-SIGN1-NOT: -fno-signed-char | // CHAR-SIGN1-NOT: -fno-signed-char | ||||
// RUN: %clang -### -S -funsigned-char %s 2>&1 | FileCheck -check-prefix=CHAR-SIGN2 %s | // RUN: %clang_bin -### -S -funsigned-char %s 2>&1 | FileCheck -check-prefix=CHAR-SIGN2 %s | ||||
// CHAR-SIGN2: -fno-signed-char | // CHAR-SIGN2: -fno-signed-char | ||||
// RUN: %clang -### -S -fno-signed-char %s 2>&1 | FileCheck -check-prefix=CHAR-SIGN3 %s | // RUN: %clang_bin -### -S -fno-signed-char %s 2>&1 | FileCheck -check-prefix=CHAR-SIGN3 %s | ||||
// CHAR-SIGN3: -fno-signed-char | // CHAR-SIGN3: -fno-signed-char | ||||
// RUN: %clang -### -S -fno-unsigned-char %s 2>&1 | FileCheck -check-prefix=CHAR-SIGN4 %s | // RUN: %clang_bin -### -S -fno-unsigned-char %s 2>&1 | FileCheck -check-prefix=CHAR-SIGN4 %s | ||||
// CHAR-SIGN4-NOT: -fno-signed-char | // CHAR-SIGN4-NOT: -fno-signed-char | ||||
// RUN: %clang -target x86_64-unknown-none-none -### -fshort-wchar -fno-short-wchar %s 2>&1 | FileCheck -check-prefix=CHECK-WCHAR1 -check-prefix=DELIMITERS %s | // RUN: %clang_bin -target x86_64-unknown-none-none -### -fshort-wchar -fno-short-wchar %s 2>&1 | FileCheck -check-prefix=CHECK-WCHAR1 -check-prefix=DELIMITERS %s | ||||
// RUN: %clang -target x86_64-unknown-none-none -### -fno-short-wchar -fshort-wchar %s 2>&1 | FileCheck -check-prefix=CHECK-WCHAR2 -check-prefix=DELIMITERS %s | // RUN: %clang_bin -target x86_64-unknown-none-none -### -fno-short-wchar -fshort-wchar %s 2>&1 | FileCheck -check-prefix=CHECK-WCHAR2 -check-prefix=DELIMITERS %s | ||||
// Make sure we don't match the -NOT lines with the linker invocation. | // Make sure we don't match the -NOT lines with the linker invocation. | ||||
// Delimiters match the start of the cc1 and the start of the linker lines | // Delimiters match the start of the cc1 and the start of the linker lines | ||||
// DELIMITERS: {{^ (\(in-process\)|")}} | // DELIMITERS: {{^ (\(in-process\)|")}} | ||||
// CHECK-WCHAR1: -fwchar-type=int | // CHECK-WCHAR1: -fwchar-type=int | ||||
// CHECK-WCHAR1-NOT: -fwchar-type=short | // CHECK-WCHAR1-NOT: -fwchar-type=short | ||||
// CHECK-WCHAR2: -fwchar-type=short | // CHECK-WCHAR2: -fwchar-type=short | ||||
// CHECK-WCHAR2-NOT: -fwchar-type=int | // CHECK-WCHAR2-NOT: -fwchar-type=int | ||||
// DELIMITERS: {{^ *"}} | // DELIMITERS: {{^ *"}} | ||||
// RUN: %clang -### -fno-experimental-new-pass-manager -fexperimental-new-pass-manager %s 2>&1 | FileCheck --check-prefix=CHECK-PM --check-prefix=CHECK-NEW-PM %s | // RUN: %clang_bin -### -fno-experimental-new-pass-manager -fexperimental-new-pass-manager %s 2>&1 | FileCheck --check-prefix=CHECK-PM --check-prefix=CHECK-NEW-PM %s | ||||
// RUN: %clang -### -fexperimental-new-pass-manager -fno-experimental-new-pass-manager %s 2>&1 | FileCheck --check-prefix=CHECK-PM --check-prefix=CHECK-NO-NEW-PM %s | // RUN: %clang_bin -### -fexperimental-new-pass-manager -fno-experimental-new-pass-manager %s 2>&1 | FileCheck --check-prefix=CHECK-PM --check-prefix=CHECK-NO-NEW-PM %s | ||||
// CHECK-PM-NOT: argument unused | // CHECK-PM-NOT: argument unused | ||||
// CHECK-NEW-PM: -fexperimental-new-pass-manager | // CHECK-NEW-PM: -fexperimental-new-pass-manager | ||||
// CHECK-NEW-PM-NOT: -fno-experimental-new-pass-manager | // CHECK-NEW-PM-NOT: -fno-experimental-new-pass-manager | ||||
// CHECK-NO-NEW-PM: -fno-experimental-new-pass-manager | // CHECK-NO-NEW-PM: -fno-experimental-new-pass-manager | ||||
// CHECK-NO-NEW-PM-NOT: -fexperimental-new-pass-manager | // CHECK-NO-NEW-PM-NOT: -fexperimental-new-pass-manager | ||||
// RUN: %clang -### -S -fstrict-return %s 2>&1 | FileCheck -check-prefix=CHECK-STRICT-RETURN %s | // RUN: %clang_bin -### -S -fstrict-return %s 2>&1 | FileCheck -check-prefix=CHECK-STRICT-RETURN %s | ||||
// RUN: %clang -### -S -fno-strict-return %s 2>&1 | FileCheck -check-prefix=CHECK-NO-STRICT-RETURN %s | // RUN: %clang_bin -### -S -fno-strict-return %s 2>&1 | FileCheck -check-prefix=CHECK-NO-STRICT-RETURN %s | ||||
// CHECK-STRICT-RETURN-NOT: "-fno-strict-return" | // CHECK-STRICT-RETURN-NOT: "-fno-strict-return" | ||||
// CHECK-NO-STRICT-RETURN: "-fno-strict-return" | // CHECK-NO-STRICT-RETURN: "-fno-strict-return" | ||||
// RUN: %clang -### -S -fno-debug-info-for-profiling -fdebug-info-for-profiling %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-DEBUG %s | // RUN: %clang_bin -### -S -fno-debug-info-for-profiling -fdebug-info-for-profiling %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-DEBUG %s | ||||
// RUN: %clang -### -S -fdebug-info-for-profiling -fno-debug-info-for-profiling %s 2>&1 | FileCheck -check-prefix=CHECK-NO-PROFILE-DEBUG %s | // RUN: %clang_bin -### -S -fdebug-info-for-profiling -fno-debug-info-for-profiling %s 2>&1 | FileCheck -check-prefix=CHECK-NO-PROFILE-DEBUG %s | ||||
// CHECK-PROFILE-DEBUG: -fdebug-info-for-profiling | // CHECK-PROFILE-DEBUG: -fdebug-info-for-profiling | ||||
// CHECK-NO-PROFILE-DEBUG-NOT: -fdebug-info-for-profiling | // CHECK-NO-PROFILE-DEBUG-NOT: -fdebug-info-for-profiling | ||||
// RUN: %clang -### -S -fallow-editor-placeholders %s 2>&1 | FileCheck -check-prefix=CHECK-ALLOW-PLACEHOLDERS %s | // RUN: %clang_bin -### -S -fallow-editor-placeholders %s 2>&1 | FileCheck -check-prefix=CHECK-ALLOW-PLACEHOLDERS %s | ||||
// RUN: %clang -### -S -fno-allow-editor-placeholders %s 2>&1 | FileCheck -check-prefix=CHECK-NO-ALLOW-PLACEHOLDERS %s | // RUN: %clang_bin -### -S -fno-allow-editor-placeholders %s 2>&1 | FileCheck -check-prefix=CHECK-NO-ALLOW-PLACEHOLDERS %s | ||||
// CHECK-ALLOW-PLACEHOLDERS: -fallow-editor-placeholders | // CHECK-ALLOW-PLACEHOLDERS: -fallow-editor-placeholders | ||||
// CHECK-NO-ALLOW-PLACEHOLDERS-NOT: -fallow-editor-placeholders | // CHECK-NO-ALLOW-PLACEHOLDERS-NOT: -fallow-editor-placeholders | ||||
// RUN: %clang -### -target x86_64-unknown-windows-msvc -fno-short-wchar %s 2>&1 | FileCheck -check-prefix CHECK-WINDOWS-ISO10646 %s | // RUN: %clang_bin -### -target x86_64-unknown-windows-msvc -fno-short-wchar %s 2>&1 | FileCheck -check-prefix CHECK-WINDOWS-ISO10646 %s | ||||
// CHECK-WINDOWS-ISO10646: "-fwchar-type=int" | // CHECK-WINDOWS-ISO10646: "-fwchar-type=int" | ||||
// CHECK-WINDOWS-ISO10646: "-fsigned-wchar" | // CHECK-WINDOWS-ISO10646: "-fsigned-wchar" | ||||
// RUN: %clang -### -S -fcf-protection %s 2>&1 | FileCheck -check-prefix=CHECK-CF-PROTECTION-FULL %s | // RUN: %clang_bin -### -S -fcf-protection %s 2>&1 | FileCheck -check-prefix=CHECK-CF-PROTECTION-FULL %s | ||||
// RUN: %clang -### -S %s 2>&1 | FileCheck -check-prefix=CHECK-NO-CF-PROTECTION-FULL %s | // RUN: %clang_bin -### -S %s 2>&1 | FileCheck -check-prefix=CHECK-NO-CF-PROTECTION-FULL %s | ||||
// RUN: %clang -### -S -fcf-protection=full %s 2>&1 | FileCheck -check-prefix=CHECK-CF-PROTECTION-FULL %s | // RUN: %clang_bin -### -S -fcf-protection=full %s 2>&1 | FileCheck -check-prefix=CHECK-CF-PROTECTION-FULL %s | ||||
// RUN: %clang -### -S %s 2>&1 | FileCheck -check-prefix=CHECK-NO-CF-PROTECTION-FULL %s | // RUN: %clang_bin -### -S %s 2>&1 | FileCheck -check-prefix=CHECK-NO-CF-PROTECTION-FULL %s | ||||
// CHECK-CF-PROTECTION-FULL: -fcf-protection=full | // CHECK-CF-PROTECTION-FULL: -fcf-protection=full | ||||
// CHECK-NO-CF-PROTECTION-FULL-NOT: -fcf-protection=full | // CHECK-NO-CF-PROTECTION-FULL-NOT: -fcf-protection=full | ||||
// RUN: %clang -### -S -fcf-protection=return %s 2>&1 | FileCheck -check-prefix=CHECK-CF-PROTECTION-RETURN %s | // RUN: %clang_bin -### -S -fcf-protection=return %s 2>&1 | FileCheck -check-prefix=CHECK-CF-PROTECTION-RETURN %s | ||||
// RUN: %clang -### -S %s 2>&1 | FileCheck -check-prefix=CHECK-NO-CF-PROTECTION-RETURN %s | // RUN: %clang_bin -### -S %s 2>&1 | FileCheck -check-prefix=CHECK-NO-CF-PROTECTION-RETURN %s | ||||
// CHECK-CF-PROTECTION-RETURN: -fcf-protection=return | // CHECK-CF-PROTECTION-RETURN: -fcf-protection=return | ||||
// CHECK-NO-CF-PROTECTION-RETURN-NOT: -fcf-protection=return | // CHECK-NO-CF-PROTECTION-RETURN-NOT: -fcf-protection=return | ||||
// RUN: %clang -### -S -fcf-protection=branch %s 2>&1 | FileCheck -check-prefix=CHECK-CF-PROTECTION-BRANCH %s | // RUN: %clang_bin -### -S -fcf-protection=branch %s 2>&1 | FileCheck -check-prefix=CHECK-CF-PROTECTION-BRANCH %s | ||||
// RUN: %clang -### -S %s 2>&1 | FileCheck -check-prefix=CHECK-NO-CF-PROTECTION-BRANCH %s | // RUN: %clang_bin -### -S %s 2>&1 | FileCheck -check-prefix=CHECK-NO-CF-PROTECTION-BRANCH %s | ||||
// CHECK-CF-PROTECTION-BRANCH: -fcf-protection=branch | // CHECK-CF-PROTECTION-BRANCH: -fcf-protection=branch | ||||
// CHECK-NO-CF-PROTECTION-BRANCH-NOT: -fcf-protection=branch | // CHECK-NO-CF-PROTECTION-BRANCH-NOT: -fcf-protection=branch | ||||
// RUN: %clang -### -S -fdebug-compilation-dir . %s 2>&1 | FileCheck -check-prefix=CHECK-DEBUG-COMPILATION-DIR %s | // RUN: %clang_bin -### -S -fdebug-compilation-dir . %s 2>&1 | FileCheck -check-prefix=CHECK-DEBUG-COMPILATION-DIR %s | ||||
// RUN: %clang -### -S -fdebug-compilation-dir=. %s 2>&1 | FileCheck -check-prefix=CHECK-DEBUG-COMPILATION-DIR %s | // RUN: %clang_bin -### -S -fdebug-compilation-dir=. %s 2>&1 | FileCheck -check-prefix=CHECK-DEBUG-COMPILATION-DIR %s | ||||
// RUN: %clang -### -fdebug-compilation-dir . -x assembler %s 2>&1 | FileCheck -check-prefix=CHECK-DEBUG-COMPILATION-DIR %s | // RUN: %clang_bin -### -fdebug-compilation-dir . -x assembler %s 2>&1 | FileCheck -check-prefix=CHECK-DEBUG-COMPILATION-DIR %s | ||||
// RUN: %clang -### -fdebug-compilation-dir=. -x assembler %s 2>&1 | FileCheck -check-prefix=CHECK-DEBUG-COMPILATION-DIR %s | // RUN: %clang_bin -### -fdebug-compilation-dir=. -x assembler %s 2>&1 | FileCheck -check-prefix=CHECK-DEBUG-COMPILATION-DIR %s | ||||
// CHECK-DEBUG-COMPILATION-DIR: "-fdebug-compilation-dir" "." | // CHECK-DEBUG-COMPILATION-DIR: "-fdebug-compilation-dir" "." | ||||
// RUN: %clang -### -S -fdiscard-value-names %s 2>&1 | FileCheck -check-prefix=CHECK-DISCARD-NAMES %s | // RUN: %clang_bin -### -S -fdiscard-value-names %s 2>&1 | FileCheck -check-prefix=CHECK-DISCARD-NAMES %s | ||||
// RUN: %clang -### -S -fno-discard-value-names %s 2>&1 | FileCheck -check-prefix=CHECK-NO-DISCARD-NAMES %s | // RUN: %clang_bin -### -S -fno-discard-value-names %s 2>&1 | FileCheck -check-prefix=CHECK-NO-DISCARD-NAMES %s | ||||
// CHECK-DISCARD-NAMES: "-discard-value-names" | // CHECK-DISCARD-NAMES: "-discard-value-names" | ||||
// CHECK-NO-DISCARD-NAMES-NOT: "-discard-value-names" | // CHECK-NO-DISCARD-NAMES-NOT: "-discard-value-names" | ||||
// RUN: %clang -### -S -fdelete-null-pointer-checks %s 2>&1 | FileCheck -check-prefix=CHECK-NULL-POINTER-CHECKS %s | // RUN: %clang_bin -### -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_bin -### -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 | // RUN: %clang_bin -### -S -fdelete-null-pointer-checks -fno-delete-null-pointer-checks %s 2>&1 | FileCheck -check-prefix=CHECK-NO-NULL-POINTER-CHECKS %s | ||||
// RUN: %clang -### -S -fno-delete-null-pointer-checks -fdelete-null-pointer-checks %s 2>&1 | FileCheck -check-prefix=CHECK-NULL-POINTER-CHECKS %s | // RUN: %clang_bin -### -S -fno-delete-null-pointer-checks -fdelete-null-pointer-checks %s 2>&1 | FileCheck -check-prefix=CHECK-NULL-POINTER-CHECKS %s | ||||
// CHECK-NO-NULL-POINTER-CHECKS: "-fno-delete-null-pointer-checks" | // CHECK-NO-NULL-POINTER-CHECKS: "-fno-delete-null-pointer-checks" | ||||
// CHECK-NULL-POINTER-CHECKS-NOT: "-fno-delete-null-pointer-checks" | // CHECK-NULL-POINTER-CHECKS-NOT: "-fno-delete-null-pointer-checks" | ||||
// RUN: %clang -### -S -target x86_64-unknown-linux -frecord-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES %s | // RUN: %clang_bin -### -S -target x86_64-unknown-linux -frecord-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES %s | ||||
// RUN: %clang -### -S -target x86_64-unknown-linux -fno-record-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-NO-RECORD-GCC-SWITCHES %s | // RUN: %clang_bin -### -S -target x86_64-unknown-linux -fno-record-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-NO-RECORD-GCC-SWITCHES %s | ||||
// RUN: %clang -### -S -target x86_64-unknown-linux -fno-record-gcc-switches -frecord-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES %s | // RUN: %clang_bin -### -S -target x86_64-unknown-linux -fno-record-gcc-switches -frecord-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES %s | ||||
// RUN: %clang -### -S -target x86_64-unknown-linux -frecord-gcc-switches -fno-record-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-NO-RECORD-GCC-SWITCHES %s | // RUN: %clang_bin -### -S -target x86_64-unknown-linux -frecord-gcc-switches -fno-record-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-NO-RECORD-GCC-SWITCHES %s | ||||
// RUN: %clang -### -S -target x86_64-unknown-linux -frecord-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES %s | // RUN: %clang_bin -### -S -target x86_64-unknown-linux -frecord-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES %s | ||||
// RUN: %clang -### -S -target x86_64-unknown-linux -fno-record-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-NO-RECORD-GCC-SWITCHES %s | // RUN: %clang_bin -### -S -target x86_64-unknown-linux -fno-record-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-NO-RECORD-GCC-SWITCHES %s | ||||
// RUN: %clang -### -S -target x86_64-unknown-linux -fno-record-command-line -frecord-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES %s | // RUN: %clang_bin -### -S -target x86_64-unknown-linux -fno-record-command-line -frecord-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES %s | ||||
// RUN: %clang -### -S -target x86_64-unknown-linux -frecord-command-line -fno-record-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-NO-RECORD-GCC-SWITCHES %s | // RUN: %clang_bin -### -S -target x86_64-unknown-linux -frecord-command-line -fno-record-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-NO-RECORD-GCC-SWITCHES %s | ||||
// Test with a couple examples of non-ELF object file formats | // Test with a couple examples of non-ELF object file formats | ||||
// RUN: %clang -### -S -target x86_64-unknown-macosx -frecord-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES-ERROR %s | // RUN: %clang_bin -### -S -target x86_64-unknown-macosx -frecord-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES-ERROR %s | ||||
// RUN: %clang -### -S -target x86_64-unknown-windows -frecord-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES-ERROR %s | // RUN: %clang_bin -### -S -target x86_64-unknown-windows -frecord-command-line %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES-ERROR %s | ||||
// CHECK-RECORD-GCC-SWITCHES: "-record-command-line" | // CHECK-RECORD-GCC-SWITCHES: "-record-command-line" | ||||
// CHECK-NO-RECORD-GCC-SWITCHES-NOT: "-record-command-line" | // CHECK-NO-RECORD-GCC-SWITCHES-NOT: "-record-command-line" | ||||
// CHECK-RECORD-GCC-SWITCHES-ERROR: error: unsupported option '-frecord-command-line' for target | // CHECK-RECORD-GCC-SWITCHES-ERROR: error: unsupported option '-frecord-command-line' for target | ||||
// Test when clang is in a path containing a space. | // Test when clang is in a path containing a space. | ||||
// RUN: mkdir -p "%t.r/with spaces" | // RUN: mkdir -p "%t.r/with spaces" | ||||
// RUN: cp %clang "%t.r/with spaces/clang" | // RUN: cp %clang_bin "%t.r/with spaces/clang" | ||||
// RUN: "%t.r/with spaces/clang" -### -S -target x86_64-unknown-linux -frecord-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES-ESCAPED %s | // RUN: "%t.r/with spaces/clang" -### -S -target x86_64-unknown-linux -frecord-gcc-switches %s 2>&1 | FileCheck -check-prefix=CHECK-RECORD-GCC-SWITCHES-ESCAPED %s | ||||
// CHECK-RECORD-GCC-SWITCHES-ESCAPED: "-record-command-line" "{{.+}}with\\ spaces{{.+}}" | // CHECK-RECORD-GCC-SWITCHES-ESCAPED: "-record-command-line" "{{.+}}with\\ spaces{{.+}}" | ||||
// RUN: %clang -### -S -ftrivial-auto-var-init=uninitialized %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-UNINIT %s | // RUN: %clang_bin -### -S -ftrivial-auto-var-init=uninitialized %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-UNINIT %s | ||||
// RUN: %clang -### -S -ftrivial-auto-var-init=pattern %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-PATTERN %s | // RUN: %clang_bin -### -S -ftrivial-auto-var-init=pattern %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-PATTERN %s | ||||
// RUN: %clang -### -S -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-ZERO-GOOD %s | // RUN: %clang_bin -### -S -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-ZERO-GOOD %s | ||||
// RUN: %clang -### -S -ftrivial-auto-var-init=zero %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-ZERO-BAD %s | // RUN: %clang_bin -### -S -ftrivial-auto-var-init=zero %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-ZERO-BAD %s | ||||
// CHECK-TRIVIAL-UNINIT-NOT: hasn't been enabled | // CHECK-TRIVIAL-UNINIT-NOT: hasn't been enabled | ||||
// CHECK-TRIVIAL-PATTERN-NOT: hasn't been enabled | // CHECK-TRIVIAL-PATTERN-NOT: hasn't been enabled | ||||
// CHECK-TRIVIAL-ZERO-GOOD-NOT: hasn't been enabled | // CHECK-TRIVIAL-ZERO-GOOD-NOT: hasn't been enabled | ||||
// CHECK-TRIVIAL-ZERO-BAD: hasn't been enabled | // CHECK-TRIVIAL-ZERO-BAD: hasn't been enabled | ||||
// RUN: %clang -### -S -ftrivial-auto-var-init=pattern -ftrivial-auto-var-init-stop-after=1 %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-PATTERN-STOP-AFTER %s | // RUN: %clang_bin -### -S -ftrivial-auto-var-init=pattern -ftrivial-auto-var-init-stop-after=1 %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-PATTERN-STOP-AFTER %s | ||||
// RUN: %clang -### -S -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang -ftrivial-auto-var-init-stop-after=1 %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-ZERO-STOP-AFTER %s | // RUN: %clang_bin -### -S -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang -ftrivial-auto-var-init-stop-after=1 %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-ZERO-STOP-AFTER %s | ||||
// RUN: %clang -### -S -ftrivial-auto-var-init-stop-after=0 %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-STOP-AFTER-MISSING-DEPENDENCY %s | // RUN: %clang_bin -### -S -ftrivial-auto-var-init-stop-after=0 %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-STOP-AFTER-MISSING-DEPENDENCY %s | ||||
// RUN: %clang -### -S -ftrivial-auto-var-init=pattern -ftrivial-auto-var-init-stop-after=0 %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-PATTERN-STOP-AFTER-INVALID-VALUE %s | // RUN: %clang_bin -### -S -ftrivial-auto-var-init=pattern -ftrivial-auto-var-init-stop-after=0 %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-PATTERN-STOP-AFTER-INVALID-VALUE %s | ||||
// RUN: %clang -### -S -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang -ftrivial-auto-var-init-stop-after=0 %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-ZERO-STOP-AFTER-INVALID-VALUE %s | // RUN: %clang_bin -### -S -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang -ftrivial-auto-var-init-stop-after=0 %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-ZERO-STOP-AFTER-INVALID-VALUE %s | ||||
// CHECK-TRIVIAL-PATTERN-STOP-AFTER-NOT: is used without -ftrivial-auto-var-init | // CHECK-TRIVIAL-PATTERN-STOP-AFTER-NOT: is used without -ftrivial-auto-var-init | ||||
// CHECK-TRIVIAL-PATTERN-STOP-AFTER-NOT: only accepts positive integers | // CHECK-TRIVIAL-PATTERN-STOP-AFTER-NOT: only accepts positive integers | ||||
// CHECK-TRIVIAL-ZERO-STOP-AFTER-NOT: is used without -ftrivial-auto-var-init | // CHECK-TRIVIAL-ZERO-STOP-AFTER-NOT: is used without -ftrivial-auto-var-init | ||||
// CHECK-TRIVIAL-ZERO-STOP-AFTER-NOT: only accepts positive integers | // CHECK-TRIVIAL-ZERO-STOP-AFTER-NOT: only accepts positive integers | ||||
// CHECK-TRIVIAL-STOP-AFTER-MISSING-DEPENDENCY: used without -ftrivial-auto-var-init | // CHECK-TRIVIAL-STOP-AFTER-MISSING-DEPENDENCY: used without -ftrivial-auto-var-init | ||||
// CHECK-TRIVIAL-PATTERN-STOP-AFTER-INVALID-VALUE: only accepts positive integers | // CHECK-TRIVIAL-PATTERN-STOP-AFTER-INVALID-VALUE: only accepts positive integers | ||||
// CHECK-TRIVIAL-ZERO-STOP-AFTER-INVALID-VALUE: only accepts positive integers | // CHECK-TRIVIAL-ZERO-STOP-AFTER-INVALID-VALUE: only accepts positive integers | ||||
// RUN: %clang -### -S -fno-temp-file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-TEMP-FILE %s | // RUN: %clang_bin -### -S -fno-temp-file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-TEMP-FILE %s | ||||
// CHECK-NO-TEMP-FILE: "-fno-temp-file" | // CHECK-NO-TEMP-FILE: "-fno-temp-file" |