brintos

brintos / llvm-project-archived public Read only

0
0
Text · 731 B · e5fefc0 Raw
24 lines · cpp
1// Test that the always/never instrument lists apply.2// RUN: echo "fun:main" > %tmp-always.txt3// RUN: echo "fun:__xray*" > %tmp-never.txt4// RUN: %clangxx_xray \5// RUN:     -fxray-never-instrument=%tmp-never.txt \6// RUN:     -fxray-always-instrument=%tmp-always.txt \7// RUN:     %s -o %t8// RUN: %llvm_xray extract -symbolize %t | \9// RUN:    FileCheck %s --check-prefix NOINSTR10// RUN: %llvm_xray extract -symbolize %t | \11// RUN:    FileCheck %s --check-prefix ALWAYSINSTR12 13// REQUIRES: built-in-llvm-tree14 15// NOINSTR-NOT: {{.*__xray_NeverInstrumented.*}}16int __xray_NeverInstrumented() {17  return 0;18}19 20// ALWAYSINSTR: {{.*function-name:.*main.*}}21int main(int argc, char *argv[]) {22  return __xray_NeverInstrumented();23}24