1 // RUN: %clang_cc1 -pg -mfentry -mrecord-mcount -triple s390x-ibm-linux -emit-llvm \ 2 // RUN: -o - %s 2>&1 | FileCheck %s 3 // RUN: not %clang_cc1 -pg -mrecord-mcount -triple s390x-ibm-linux -emit-llvm -o - \ 4 // RUN: %s 2>&1 | FileCheck -check-prefix=NOMFENTRY %s 5 // RUN: %clang_cc1 -mfentry -mrecord-mcount -triple s390x-ibm-linux -emit-llvm -o - \ 6 // RUN: %s 2>&1 | FileCheck -check-prefix=NOPG %s 7 // RUN: %clang_cc1 -mrecord-mcount -triple s390x-ibm-linux -emit-llvm -o - %s \ 8 // RUN: 2>&1 | FileCheck -check-prefix=NOPG %s 9 10 int foo(void) { 11 return 0; 12 } 13 14 int __attribute__((no_instrument_function)) no_instrument(void) { 15 return foo(); 16 } 17 18 //CHECK: attributes #0 = { {{.*}}"mrecord-mcount"{{.*}} } 19 //CHECK: attributes #1 = { {{.*}} } 20 //CHECK-NOT: attributes #1 = { {{.*}}"mrecord-mcount"{{.*}} } 21 //NOMFENTRY: error: option '-mrecord-mcount' cannot be specified without '-mfentry' 22 //NOPG-NOT: attributes #0 = { {{.*}}"mrecord-mcount"{{.*}} } 23 //NOPG-NOT: attributes #1 = { {{.*}}"mrecord-mcount"{{.*}} } 24