Ian Levesque | 7c7c8e0 | 2020-06-16 20:36:11 -0400 | [diff] [blame] | 1 | // This test ensures that when we invoke the clang compiler, that the -cc1 |
| 2 | // options respect the -fno-xray-function-index flag we provide in the |
| 3 | // invocation. The default should be to *include* the function index. |
| 4 | // |
Fangrui Song | f39000b | 2020-06-17 12:59:02 -0700 | [diff] [blame] | 5 | // RUN: %clang -### -fxray-instrument -target x86_64 -c %s 2>&1 | FileCheck %s |
| 6 | // RUN: %clang -### -fxray-instrument -target x86_64 -fxray-function-index -c %s 2>&1 | FileCheck %s |
| 7 | |
Ian Levesque | 7c7c8e0 | 2020-06-16 20:36:11 -0400 | [diff] [blame] | 8 | // CHECK-NOT: -fno-xray-function-index |
Fangrui Song | f39000b | 2020-06-17 12:59:02 -0700 | [diff] [blame] | 9 | |
| 10 | // RUN: %clang -### -fxray-instrument -target x86_64 -fno-xray-function-index -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-DISABLED |
| 11 | |
Ian Levesque | 7c7c8e0 | 2020-06-16 20:36:11 -0400 | [diff] [blame] | 12 | // CHECK-DISABLED: -fno-xray-function-index |