[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Driver / target-override.c
blob2c605ac9a03da54940a46de6f155497caee4473d
1 // REQUIRES: shell
2 // REQUIRES: x86-registered-target
4 // RUN: rm -rf %t && mkdir %t
5 // RUN: ln -s %clang %t/i386-clang
6 // RUN: ln -s %clang %t/x86_64-pc-freebsd13.1-clang
8 // Check if invocation of "foo-clang" adds option "-target foo".
9 //
10 // RUN: %t/i386-clang -c -### %s 2>&1 | FileCheck -check-prefix CHECK-TG1 %s
11 // CHECK-TG1: Target: i386
13 // Check if invocation of "foo-clang --target=bar" overrides option "-target foo".
15 // RUN: %t/i386-clang -c --target=x86_64 -### %s 2>&1 | FileCheck -check-prefix CHECK-TG2 %s
16 // CHECK-TG2: Target: x86_64
18 /// Check if invocation of "arch-vendor-osX.Y-clang" adds option "-target arch-vendor-osX.Y".
19 // RUN: %t/x86_64-pc-freebsd13.1-clang -c -### %s 2>&1 | FileCheck -check-prefix CHECK-TG3 %s
20 // CHECK-TG3: Target: x86_64-pc-freebsd13.1