| 1 |
// RUN: %clang -### --target=aarch64-pc-freebsd -fxray-instrument -c %s -o /dev/null 2>&1 | FileCheck %s |
| 2 |
// RUN: %clang -### --target=arm64-apple-macos -fxray-instrument -c %s -o /dev/null 2>&1 | FileCheck %s |
| 3 |
// RUN: %clang -### --target=x86_64-apple-darwin -fxray-instrument -c %s -o /dev/null 2>&1 | FileCheck %s |
| 4 |
// RUN: not %clang -### --target=x86_64-pc-windows -fxray-instrument -c %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR |
| 5 |
|
| 6 |
/// Checking -fxray-instrument with offloading and -Xarch_host |
| 7 |
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -Xarch_host -fxray-instrument -c %s -o /dev/null 2>&1 | FileCheck %s |
| 8 |
// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -x hip --offload-arch=gfx906 -nogpulib -nogpuinc -fxray-instrument -c %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR |
| 9 |
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -x hip --offload-arch=gfx906 -nogpulib -nogpuinc -Xarch_host -fxray-instrument -c %s -o /dev/null 2>&1 | FileCheck %s |
| 10 |
|
| 11 |
// CHECK: "-cc1" {{.*}}"-fxray-instrument" |
| 12 |
// ERR: error: unsupported option '-fxray-instrument' for target |
| 13 |
|
| 14 |
typedef int a; |