51 lines · cpp
1// RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - \2// RUN: -triple x86_64-unknown-linux-gnu | FileCheck %s3// 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 %s5// RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - \6// RUN: -triple mips-unknown-linux-gnu | FileCheck %s7// RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - \8// RUN: -triple mipsisa32r6-unknown-linux-gnu | FileCheck %s9// RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - \10// RUN: -triple mipsel-unknown-linux-gnu | FileCheck %s11// RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - \12// RUN: -triple mipsisa32r6el-unknown-linux-gnu | FileCheck %s13// RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - \14// RUN: -triple mips64-unknown-linux-gnu | FileCheck %s15// RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - \16// RUN: -triple mipsisa64r6-unknown-linux-gnu | FileCheck %s17// RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - \18// RUN: -triple mips64el-unknown-linux-gnu | FileCheck %s19// RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - \20// RUN: -triple mipsisa64r6el-unknown-linux-gnu | FileCheck %s21// RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - \22// RUN: -triple mips64-unknown-linux-gnuabi64 | FileCheck %s23// RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - \24// RUN: -triple mipsisa64r6-unknown-linux-gnuabi64 | FileCheck %s25// RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - \26// RUN: -triple mips64el-unknown-linux-gnuabi64 | FileCheck %s27// RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - \28// RUN: -triple mipsisa64r6el-unknown-linux-gnuabi64 | FileCheck %s29// RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - \30// RUN: -triple mips64-unknown-linux-gnuabin32 | FileCheck %s31// RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - \32// RUN: -triple mipsisa64r6-unknown-linux-gnuabin32 | FileCheck %s33// RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - \34// RUN: -triple mips64el-unknown-linux-gnuabin32 | FileCheck %s35// RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - \36// RUN: -triple mipsisa64r6el-unknown-linux-gnuabin32 | FileCheck %s37// RUN: %clang_cc1 %s -fxray-instrument -std=c++11 -x c++ -emit-llvm -o - \38// RUN: -triple powerpc64le-unknown-linux-gnu | FileCheck %s39 40// Make sure that the LLVM attribute for XRay-annotated functions do show up.41[[clang::xray_always_instrument]] void foo() {42// CHECK: define{{.*}} void @_Z3foov() #043};44 45[[clang::xray_never_instrument]] void bar() {46// CHECK: define{{.*}} void @_Z3barv() #147};48 49// CHECK: #0 = {{.*}}"function-instrument"="xray-always"50// CHECK: #1 = {{.*}}"function-instrument"="xray-never"51