diff options
Diffstat (limited to 'test/xray/TestCases/Posix/clang-no-xray-instrument.cc')
-rw-r--r-- | test/xray/TestCases/Posix/clang-no-xray-instrument.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/xray/TestCases/Posix/clang-no-xray-instrument.cc b/test/xray/TestCases/Posix/clang-no-xray-instrument.cc new file mode 100644 index 0000000000000..c2444b18ab6ed --- /dev/null +++ b/test/xray/TestCases/Posix/clang-no-xray-instrument.cc @@ -0,0 +1,11 @@ +// Test that we cannot actually find XRay instrumentation when we build with +// -fno-xray-instrument but have code that's marked as 'xray_always_instrument'. +// +// RUN: %clangxx -fno-xray-instrument -c %s -o %t.o +// RUN: not %llvm_xray extract -symbolize %t.o 2>&1 | FileCheck %s +// REQUIRES: x86_64-target-arch +// REQUIRES: built-in-llvm-tree + +// CHECK: llvm-xray: Cannot extract instrumentation map +// CHECK-NOT: {{.*always_instrumented.*}} +[[clang::xray_always_instrument]] int always_instrumented() { return 42; } |