brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.9 KiB · 7b9ccb2 Raw
66 lines · cpp
1// RUN: %clang_cc1 -fxray-instrument -fxray-instrumentation-bundle=none -x c++ \2// RUN:     -std=c++11 -triple x86_64-unknown-unknown -emit-llvm -o - %s \3// RUN:     | FileCheck --check-prefixes CHECK,NOFUNCTION,NOCUSTOM,NOTYPED %s4// RUN: %clang_cc1 -fxray-instrument -fxray-instrumentation-bundle=function -x c++ \5// RUN:     -std=c++11 -triple x86_64-unknown-unknown -emit-llvm -o - %s \6// RUN:     | FileCheck --check-prefixes CHECK,FUNCTION,NOCUSTOM,NOTYPED %s7// RUN: %clang_cc1 -fxray-instrument \8// RUN:     -fxray-instrumentation-bundle=custom -x c++ \9// RUN:     -std=c++11 -triple x86_64-unknown-unknown -emit-llvm -o - %s \10// RUN:     | FileCheck --check-prefixes CHECK,NOFUNCTION,CUSTOM,NOTYPED %s11// RUN: %clang_cc1 -fxray-instrument \12// RUN:     -fxray-instrumentation-bundle=typed -x c++ \13// RUN:     -std=c++11 -triple x86_64-unknown-unknown -emit-llvm -o - %s \14// RUN:     | FileCheck --check-prefixes CHECK,NOFUNCTION,NOCUSTOM,TYPED %s15// RUN: %clang_cc1 -fxray-instrument \16// RUN:     -fxray-instrumentation-bundle=custom,typed -x c++ \17// RUN:     -std=c++11 -triple x86_64-unknown-unknown -emit-llvm -o - %s \18// RUN:     | FileCheck --check-prefixes CHECK,NOFUNCTION,CUSTOM,TYPED %s19// RUN: %clang_cc1 -fxray-instrument \20// RUN:     -fxray-instrumentation-bundle=function,custom -x c++ \21// RUN:     -std=c++11 -triple x86_64-unknown-unknown -emit-llvm -o - %s \22// RUN:     | FileCheck --check-prefixes CHECK,FUNCTION,CUSTOM,NOTYPED %s23// RUN: %clang_cc1 -fxray-instrument \24// RUN:     -fxray-instrumentation-bundle=function,typed -x c++ \25// RUN:     -std=c++11 -triple x86_64-unknown-unknown -emit-llvm -o - %s \26// RUN:     | FileCheck --check-prefixes CHECK,FUNCTION,NOCUSTOM,TYPED %s27// RUN: %clang_cc1 -fxray-instrument \28// RUN:     -fxray-instrumentation-bundle=function,custom,typed -x c++ \29// RUN:     -std=c++11 -triple x86_64-unknown-unknown -emit-llvm -o - %s \30// RUN:     | FileCheck --check-prefixes CHECK,FUNCTION,CUSTOM,TYPED %s31// RUN: %clang_cc1 -fxray-instrument \32// RUN:     -fxray-instrumentation-bundle=function \33// RUN:     -fxray-instrumentation-bundle=custom \34// RUN:     -fxray-instrumentation-bundle=typed -x c++ \35// RUN:     -std=c++11 -triple x86_64-unknown-unknown -emit-llvm -o - %s \36// RUN:     | FileCheck --check-prefixes CHECK,FUNCTION,CUSTOM,TYPED %s37// RUN: %clang_cc1 -fxray-instrument \38// RUN:     -fxray-instrumentation-bundle=function-entry -x c++ \39// RUN:     -std=c++11 -triple x86_64-unknown-unknown -emit-llvm -o - %s \40// RUN:     | FileCheck --check-prefixes CHECK,NOCUSTOM,NOTYPED,SKIPEXIT %s41// RUN: %clang_cc1 -fxray-instrument \42// RUN:     -fxray-instrumentation-bundle=function-exit -x c++ \43// RUN:     -std=c++11 -triple x86_64-unknown-unknown -emit-llvm -o - %s \44// RUN:     | FileCheck --check-prefixes CHECK,NOCUSTOM,NOTYPED,SKIPENTRY %s45// RUN: %clang_cc1 -fxray-instrument \46// RUN:     -fxray-instrumentation-bundle=function-entry,function-exit -x c++ \47// RUN:     -std=c++11 -triple x86_64-unknown-unknown -emit-llvm -o - %s \48// RUN:     | FileCheck --check-prefixes CHECK,FUNCTION,NOCUSTOM,NOTYPED %s49 50// CHECK: define{{.*}} void @_Z16alwaysInstrumentv() #[[ALWAYSATTR:[0-9]+]] {51[[clang::xray_always_instrument]] void alwaysInstrument() {52  static constexpr char kPhase[] = "always";53  __xray_customevent(kPhase, 6);54  __xray_typedevent(1, kPhase, 6);55  // CUSTOM: call void @llvm.xray.customevent(ptr {{.*}}, i64 6)56  // NOCUSTOM-NOT: call void @llvm.xray.customevent(57  // TYPED: call void @llvm.xray.typedevent(i64 {{.*}}, ptr{{.*}}, i64 6)58  // NOTYPED-NOT: call void @llvm.xray.typedevent(59}60 61// FUNCTION: attributes #[[ALWAYSATTR]] = {{.*}} "function-instrument"="xray-always" {{.*}}62// NOFUNCTION-NOT: attributes #[[ALWAYSATTR]] = {{.*}} "function-instrument"="xray-always" {{.*}}63 64// SKIPENTRY: attributes #[[ALWAYSATTR]] = {{.*}} "function-instrument"="xray-always" {{.*}} "xray-skip-entry" {{.*}}65// SKIPEXIT: attributes #[[ALWAYSATTR]] = {{.*}} "function-instrument"="xray-always" {{.*}} "xray-skip-exit" {{.*}}66