bolt/deps/llvm-18.1.8/compiler-rt/test/xray/TestCases/Posix/clang-no-xray-instrument.cpp
2025-02-14 19:21:04 +01:00

10 lines
486 B
C++

// 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: built-in-llvm-tree
// CHECK: llvm-xray: Cannot extract instrumentation map
// CHECK-NOT: {{.*always_instrumented.*}}
[[clang::xray_always_instrument]] int always_instrumented() { return 42; }