blob: f0d1a8a8c7372100d7a3f0fe23a98cfacf9529b5 [file] [log] [blame]
Ian Levesque7c7c8e02020-06-16 20:36:11 -04001// 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 Songf39000b2020-06-17 12:59:02 -07005// 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 Levesque7c7c8e02020-06-16 20:36:11 -04008// CHECK-NOT: -fno-xray-function-index
Fangrui Songf39000b2020-06-17 12:59:02 -07009
10// RUN: %clang -### -fxray-instrument -target x86_64 -fno-xray-function-index -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-DISABLED
11
Ian Levesque7c7c8e02020-06-16 20:36:11 -040012// CHECK-DISABLED: -fno-xray-function-index