Summary: This change allows us to add arg1 logging support to functions through the special case list provided through -fxray-always-instrument=. This is useful for adding arg1 logging to functions that are either in headers that users don't have control over (i.e. cannot change the source) or would rather not do. It only takes effect when the pattern is matched through the "fun:" special case, as a category. As in: fun:*pattern=arg1 Reviewers: pelikan, rnk Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33392 llvm-svn: 303719
13 lines
524 B
C++
13 lines
524 B
C++
// RUN: echo "fun:*arg1*=arg1" >> %t.always-instrument
|
|
// RUN: %clang_cc1 -fxray-instrument -x c++ -std=c++11 -fxray-always-instrument=%t.always-instrument -emit-llvm -o - %s -triple x86_64-unknown-linux-gnu | FileCheck %s
|
|
|
|
void foo() {}
|
|
|
|
void arg1(void*) {}
|
|
|
|
// CHECK: define void @_Z3foov() #[[FOO:[0-9]+]] {
|
|
// CHECK: define void {{.*}}arg1{{.*}} #[[ALWAYSARG1:[0-9]+]] {
|
|
|
|
// CHECK: attributes #[[FOO]] = {{.*}}
|
|
// CHECK: attributes #[[ALWAYSARG1]] = {{.*}} "function-instrument"="xray-always" {{.*}} "xray-log-args"="1"
|