brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · f2ed85d Raw
31 lines · cpp
1// We want to ensure that the "never instrument" attributes show up even if we2// explicitly turn off XRay instrumentation.3//4/// -fno-xray-instrument is the default. It does not produce a CC1 option.5// RUN: %clang_cc1 %s -std=c++11 -x c++ -emit-llvm -o - \6// RUN:     -triple x86_64-unknown-linux-gnu | FileCheck %s7// RUN: %clang_cc1 %s -std=c++11 -x c++ -emit-llvm -o - \8// RUN:     -triple arm-unknown-linux-gnu -target-abi apcs-gnu | FileCheck %s9// RUN: %clang_cc1 %s -std=c++11 -x c++ -emit-llvm -o - \10// RUN:     -triple mips-unknown-linux-gnu | FileCheck %s11// RUN: %clang_cc1 %s -std=c++11 -x c++ -emit-llvm -o - \12// RUN:     -triple mipsel-unknown-linux-gnu | FileCheck %s13// RUN: %clang_cc1 %s -std=c++11 -x c++ -emit-llvm -o - \14// RUN:     -triple mips64-unknown-linux-gnu | FileCheck %s15// RUN: %clang_cc1 %s -std=c++11 -x c++ -emit-llvm -o - \16// RUN:     -triple mips64el-unknown-linux-gnu | FileCheck %s17// RUN: %clang_cc1 %s -std=c++11 -x c++ -emit-llvm -o - \18// RUN:     -triple powerpc64le-unknown-linux-gnu | FileCheck %s19 20[[clang::xray_always_instrument]] void foo() {21// CHECK: define{{.*}} void @_Z3foov() #022}23 24[[clang::xray_never_instrument]] void bar() {25// CHECK: define{{.*}} void @_Z3barv() #126}27 28// CHECK-NOT: #0 = {{.*}}"function-instrument"="xray-always"29// CHECK: #1 = {{.*}}"function-instrument"="xray-never"30 31