diff options
author | Nirav Dave <niravd@google.com> | 2017-01-31 17:00:35 +0000 |
---|---|---|
committer | Nirav Dave <niravd@google.com> | 2017-01-31 17:00:35 +0000 |
commit | 0c86ccf4b418dde2d4b4d5b57a2aeae1e7d381fc (patch) | |
tree | 698c1022857b6fe985efcd347f3a4fb3c29c5871 /clang/test/CodeGen/fentry.c | |
parent | a7c041d1477bdfd753f7155b2cb1fb739eaddb0f (diff) | |
download | bcm5719-llvm-0c86ccf4b418dde2d4b4d5b57a2aeae1e7d381fc.tar.gz bcm5719-llvm-0c86ccf4b418dde2d4b4d5b57a2aeae1e7d381fc.zip |
[X86] Teach Clang about -mfentry flag
Replace mcount calls with calls to fentry.
Reviewers: hfinkel, craig.topper
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D28001
llvm-svn: 293649
Diffstat (limited to 'clang/test/CodeGen/fentry.c')
-rw-r--r-- | clang/test/CodeGen/fentry.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/CodeGen/fentry.c b/clang/test/CodeGen/fentry.c new file mode 100644 index 00000000000..b9133184e4d --- /dev/null +++ b/clang/test/CodeGen/fentry.c @@ -0,0 +1,11 @@ +// RUN: %clang_cc1 -pg -mfentry -triple i386-unknown-unknown -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -pg -mfentry -triple x86_64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -mfentry -triple i386-unknown-unknown -emit-llvm -o - %s | FileCheck -check-prefix=NOPG %s +// RUN: %clang_cc1 -mfentry -triple x86_64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck -check-prefix=NOPG %s + +int foo(void) { + return 0; +} + +//CHECK: attributes #{{[0-9]+}} = { {{.*}}"fentry-call"="true"{{.*}} } +//NOPG-NOT: attributes #{{[0-9]+}} = { {{.*}}"fentry-call"{{.*}} } |