1 // RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - \ 2 // RUN: -triple x86_64-unknown-linux-gnu | FileCheck %s 3 // RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - \ 4 // RUN: -triple arm-unknown-linux-gnu -target-abi apcs-gnu | FileCheck %s 5 // RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - \ 6 // RUN: -triple mips-unknown-linux-gnu | FileCheck %s 7 // RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - \ 8 // RUN: -triple mipsel-unknown-linux-gnu | FileCheck %s 9 // RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - \ 10 // RUN: -triple mips64-unknown-linux-gnu | FileCheck %s 11 // RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - \ 12 // RUN: -triple mips64el-unknown-linux-gnu | FileCheck %s 13 // RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - \ 14 // RUN: -triple powerpc64le-unknown-linux-gnu | FileCheck %s 15 16 // Make sure that the LLVM attribute for XRay-annotated functions do show up. 17 [[clang::xray_always_instrument]] void foo() { 18 // CHECK: define void @_Z3foov() #0 19 }; 20 21 [[clang::xray_never_instrument]] void bar() { 22 // CHECK: define void @_Z3barv() #1 23 }; 24 25 // CHECK: #0 = {{.*}}"function-instrument"="xray-always" 26 // CHECK: #1 = {{.*}}"function-instrument"="xray-never" 27