blob: 43586c45633d0ae1e2061edaf313c2f60c186193 [file] [log] [blame]
Andrew Top61a84952019-04-30 15:07:33 -07001// RUN: %clang_cc1 -pg -mfentry -triple i386-unknown-unknown -emit-llvm -o - %s | FileCheck %s
2// RUN: %clang_cc1 -pg -mfentry -triple x86_64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s
3// RUN: %clang_cc1 -mfentry -triple i386-unknown-unknown -emit-llvm -o - %s | FileCheck -check-prefix=NOPG %s
4// RUN: %clang_cc1 -mfentry -triple x86_64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck -check-prefix=NOPG %s
5
6int foo(void) {
7 return 0;
8}
9
10int __attribute__((no_instrument_function)) no_instrument(void) {
11 return foo();
12}
13
14//CHECK: attributes #0 = { {{.*}}"fentry-call"="true"{{.*}} }
15//CHECK: attributes #1 = { {{.*}} }
16//CHECK-NOT: attributes #1 = { {{.*}}"fentry-call"="true"{{.*}} }
17//NOPG-NOT: attributes #0 = { {{.*}}"fentry-call"{{.*}} }
18//NOPG-NOT: attributes #1 = { {{.*}}"fentry-call"{{.*}} }