1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
| // Test that the always/never instrument lists apply.
// RUN: echo "fun:main" > %tmp-always.txt
// RUN: echo "fun:__xray*" > %tmp-never.txt
// RUN: %clangxx_xray \
// RUN: -fxray-never-instrument=%tmp-never.txt \
// RUN: -fxray-always-instrument=%tmp-always.txt \
// RUN: %s -o %t
// RUN: %llvm_xray extract -symbolize %t | \
// RUN: FileCheck %s --check-prefix NOINSTR
// RUN: %llvm_xray extract -symbolize %t | \
// RUN: FileCheck %s --check-prefix ALWAYSINSTR
// REQUIRES: x86_64-target-arch
// REQUIRES: built-in-llvm-tree
// NOINSTR-NOT: {{.*__xray_NeverInstrumented.*}}
int __xray_NeverInstrumented() {
return 0;
}
// ALWAYSINSTR: {{.*function-name:.*main.*}}
int main(int argc, char *argv[]) {
return __xray_NeverInstrumented();
}
|