summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/fentry.c
diff options
context:
space:
mode:
authorManoj Gupta <manojgupta@google.com>2018-03-02 23:52:44 +0000
committerManoj Gupta <manojgupta@google.com>2018-03-02 23:52:44 +0000
commit886b4505f2d71ec34aea8b3342914f7daee45db4 (patch)
treed7b784b99b935a544f93db31ba8cea2631e719c8 /clang/test/CodeGen/fentry.c
parenta4619d9944c7e54c421582c7dc592ae051d8bf51 (diff)
downloadbcm5719-llvm-886b4505f2d71ec34aea8b3342914f7daee45db4.tar.gz
bcm5719-llvm-886b4505f2d71ec34aea8b3342914f7daee45db4.zip
Do not generate calls to fentry with __attribute__((no_instrument_function))
Summary: Currently only calls to mcount were suppressed with no_instrument_function attribute. Linux kernel requires that calls to fentry should also not be generated. This is an extended fix for PR PR33515. Reviewers: hfinkel, rengolin, srhines, rnk, rsmith, rjmccall, hans Reviewed By: rjmccall Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D43995 llvm-svn: 326639
Diffstat (limited to 'clang/test/CodeGen/fentry.c')
-rw-r--r--clang/test/CodeGen/fentry.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/clang/test/CodeGen/fentry.c b/clang/test/CodeGen/fentry.c
index b9133184e4d..43586c45633 100644
--- a/clang/test/CodeGen/fentry.c
+++ b/clang/test/CodeGen/fentry.c
@@ -7,5 +7,12 @@ int foo(void) {
return 0;
}
-//CHECK: attributes #{{[0-9]+}} = { {{.*}}"fentry-call"="true"{{.*}} }
-//NOPG-NOT: attributes #{{[0-9]+}} = { {{.*}}"fentry-call"{{.*}} }
+int __attribute__((no_instrument_function)) no_instrument(void) {
+ return foo();
+}
+
+//CHECK: attributes #0 = { {{.*}}"fentry-call"="true"{{.*}} }
+//CHECK: attributes #1 = { {{.*}} }
+//CHECK-NOT: attributes #1 = { {{.*}}"fentry-call"="true"{{.*}} }
+//NOPG-NOT: attributes #0 = { {{.*}}"fentry-call"{{.*}} }
+//NOPG-NOT: attributes #1 = { {{.*}}"fentry-call"{{.*}} }
OpenPOWER on IntegriCloud