2017-05-24 13:46:36 +08:00
|
|
|
// RUN: echo "fun:*arg1*=arg1" >> %t.always-instrument
|
2018-04-09 12:02:09 +08:00
|
|
|
// RUN: echo "[always]" > %t.xray-attrlist
|
|
|
|
// RUN: echo "fun:*arg1*=arg1" >> %t.xray-attrlist
|
|
|
|
// RUN: %clang_cc1 -fxray-instrument -x c++ -std=c++11 \
|
|
|
|
// RUN: -fxray-always-instrument=%t.always-instrument -emit-llvm -o - %s \
|
|
|
|
// RUN: -triple x86_64-unknown-linux-gnu | FileCheck %s
|
|
|
|
// RUN: %clang_cc1 -fxray-instrument -x c++ -std=c++11 \
|
|
|
|
// RUN: -fxray-attr-list=%t.xray-attrlist -emit-llvm -o - %s \
|
|
|
|
// RUN: -triple x86_64-unknown-linux-gnu | FileCheck %s
|
2017-05-24 13:46:36 +08:00
|
|
|
|
|
|
|
void foo() {}
|
|
|
|
|
|
|
|
void arg1(void*) {}
|
|
|
|
|
[CodeGenModule] Assume dso_local for -fpic -fno-semantic-interposition
Summary:
Clang -fpic defaults to -fno-semantic-interposition (GCC -fpic defaults
to -fsemantic-interposition).
Users need to specify -fsemantic-interposition to get semantic
interposition behavior.
Semantic interposition is currently a best-effort feature. There may
still be some cases where it is not handled well.
Reviewers: peter.smith, rnk, serge-sans-paille, sfertile, jfb, jdoerfert
Subscribers: dschuff, jyknight, dylanmckay, nemanjai, jvesely, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, jrtc27, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, arphaman, PkmX, jocewei, jsji, Jim, lenary, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D73865
2020-02-03 04:23:47 +08:00
|
|
|
// CHECK: define dso_local void @_Z3foov() #[[FOO:[0-9]+]] {
|
|
|
|
// CHECK: define dso_local void {{.*}}arg1{{.*}} #[[ALWAYSARG1:[0-9]+]] {
|
2017-05-24 13:46:36 +08:00
|
|
|
|
|
|
|
// CHECK: attributes #[[FOO]] = {{.*}}
|
|
|
|
// CHECK: attributes #[[ALWAYSARG1]] = {{.*}} "function-instrument"="xray-always" {{.*}} "xray-log-args"="1"
|