[LLVM][IR] Use splat syntax when printing ConstantExpr based splats. (#116856)
[llvm-project.git] / clang / test / CodeGen / xray-never-instrument.cpp
blobcffb9a6ee4057714389426ce0bb91e0327697afd
1 // RUN: echo "fun:*foo*" > %t.never-instrument
2 // RUN: echo "src:*xray-never-instrument.cpp" >> %t.never-instrument
3 // RUN: echo "[never]" > %t.xray-attrlist
4 // RUN: echo "fun:*foo*" >> %t.xray-attrlist
5 // RUN: echo "src:*xray-never-instrument.cpp" >> %t.xray-attrlist
6 // RUN: %clang_cc1 -fxray-instrument -x c++ -std=c++11 \
7 // RUN: -fxray-never-instrument=%t.never-instrument -emit-llvm -o - %s \
8 // RUN: -triple x86_64-unknown-linux-gnu | FileCheck %s
9 // RUN: %clang_cc1 -fxray-instrument -x c++ -std=c++11 \
10 // RUN: -fxray-attr-list=%t.xray-attrlist -emit-llvm -o - %s \
11 // RUN: -triple x86_64-unknown-linux-gnu | FileCheck %s
13 void foo() {}
15 [[clang::xray_always_instrument]] void bar() {}
17 void baz() {}
19 // CHECK: define{{.*}} void @_Z3foov() #[[NEVERATTR:[0-9]+]] {
20 // CHECK: define{{.*}} void @_Z3barv() #[[ALWAYSATTR:[0-9]+]] {
21 // CHECK: define{{.*}} void @_Z3bazv() #[[NEVERATTR:[0-9]+]] {
22 // CHECK: attributes #[[NEVERATTR]] = {{.*}} "function-instrument"="xray-never" {{.*}}
23 // CHECK: attributes #[[ALWAYSATTR]] = {{.*}} "function-instrument"="xray-always" {{.*}}