[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGen / mnop-mcount.c
blobebb21cc560e3705848951b494dd0e5dfcb4f2bf3
1 // RUN: %clang_cc1 -pg -mfentry -mnop-mcount -triple s390x-ibm-linux -emit-llvm \
2 // RUN: -o - %s 2>&1 | FileCheck %s
3 // RUN: not %clang_cc1 -pg -mnop-mcount -triple s390x-ibm-linux -emit-llvm -o - \
4 // RUN: %s 2>&1 | FileCheck -check-prefix=NOMFENTRY %s
5 // RUN: %clang_cc1 -mfentry -mnop-mcount -triple s390x-ibm-linux -emit-llvm -o - \
6 // RUN: %s 2>&1 | FileCheck -check-prefix=NOPG %s
7 // RUN: %clang_cc1 -mnop-mcount -triple s390x-ibm-linux -emit-llvm -o - %s \
8 // RUN: 2>&1 | FileCheck -check-prefix=NOPG %s
10 int foo(void) {
11 return 0;
14 int __attribute__((no_instrument_function)) no_instrument(void) {
15 return foo();
18 //CHECK: attributes #0 = { {{.*}}"mnop-mcount"{{.*}} }
19 //CHECK: attributes #1 = { {{.*}} }
20 //CHECK-NOT: attributes #1 = { {{.*}}"mnop-mcount"{{.*}} }
21 //NOMFENTRY: error: option '-mnop-mcount' cannot be specified without '-mfentry'
22 //NOPG-NOT: attributes #0 = { {{.*}}"mnop-mcount"{{.*}} }
23 //NOPG-NOT: attributes #1 = { {{.*}}"mnop-mcount"{{.*}} }