annotate clang/test/CodeGen/xray-always-instrument.cpp @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children 2e18cbf3894f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: echo "fun:*foo*" > %t.always-instrument
anatofuz
parents:
diff changeset
2 // RUN: echo "src:*xray-always-instrument.cpp" >> %t.always-instrument
anatofuz
parents:
diff changeset
3 // RUN: echo "[always]" > %t.xray-attrlist
anatofuz
parents:
diff changeset
4 // RUN: echo "fun:*foo*" >> %t.xray-attrlist
anatofuz
parents:
diff changeset
5 // RUN: echo "src:*xray-always-instrument.cpp" >> %t.xray-attrlist
anatofuz
parents:
diff changeset
6 // RUN: %clang_cc1 -fxray-instrument -x c++ -std=c++11 \
anatofuz
parents:
diff changeset
7 // RUN: -fxray-always-instrument=%t.always-instrument -emit-llvm -o - %s \
anatofuz
parents:
diff changeset
8 // RUN: -triple x86_64-unknown-linux-gnu | FileCheck %s
anatofuz
parents:
diff changeset
9 // RUN: %clang_cc1 -fxray-instrument -x c++ -std=c++11 \
anatofuz
parents:
diff changeset
10 // RUN: -fxray-attr-list=%t.xray-attrlist -emit-llvm -o - %s \
anatofuz
parents:
diff changeset
11 // RUN: -triple x86_64-unknown-linux-gnu | FileCheck %s
anatofuz
parents:
diff changeset
12
anatofuz
parents:
diff changeset
13 void foo() {}
anatofuz
parents:
diff changeset
14
anatofuz
parents:
diff changeset
15 [[clang::xray_never_instrument]] void bar() {}
anatofuz
parents:
diff changeset
16
anatofuz
parents:
diff changeset
17 void baz() {}
anatofuz
parents:
diff changeset
18
anatofuz
parents:
diff changeset
19 // CHECK: define void @_Z3foov() #[[ALWAYSATTR:[0-9]+]] {
anatofuz
parents:
diff changeset
20 // CHECK: define void @_Z3barv() #[[NEVERATTR:[0-9]+]] {
anatofuz
parents:
diff changeset
21 // CHECK: define void @_Z3bazv() #[[ALWAYSATTR:[0-9]+]] {
anatofuz
parents:
diff changeset
22 // CHECK: attributes #[[ALWAYSATTR]] = {{.*}} "function-instrument"="xray-always" {{.*}}
anatofuz
parents:
diff changeset
23 // CHECK: attributes #[[NEVERATTR]] = {{.*}} "function-instrument"="xray-never" {{.*}}