blob: b5f4489bd97eea320926499551e00873be29bdab [file] [log] [blame]
Dean Michael Berris504fc222017-03-30 22:46:45 +00001// RUN: %clang_cc1 -fxray-instrument -fxray-instruction-threshold=1 -x c++ -std=c++11 -emit-llvm -o - %s -triple x86_64-unknown-linux-gnu | FileCheck %s
2
3int foo() {
4 return 1;
5}
6
7[[clang::xray_never_instrument]] int bar() {
8 return 2;
9}
10
Dean Michael Berrisac7a2f92017-03-30 22:46:49 +000011// CHECK: define i32 @_Z3foov() #[[THRESHOLD:[0-9]+]] {
12// CHECK: define i32 @_Z3barv() #[[NEVERATTR:[0-9]+]] {
Dean Michael Berris504fc222017-03-30 22:46:45 +000013// CHECK-DAG: attributes #[[THRESHOLD]] = {{.*}} "xray-instruction-threshold"="1" {{.*}}
14// CHECK-DAG: attributes #[[NEVERATTR]] = {{.*}} "function-instrument"="xray-never" {{.*}}