brintos

brintos / llvm-project-archived public Read only

0
0
Text · 985 B · ebb21cc Raw
24 lines · c
1// RUN: %clang_cc1 -pg -mfentry -mnop-mcount -triple s390x-ibm-linux -emit-llvm \2// RUN:   -o - %s 2>&1 | FileCheck  %s3// RUN: not %clang_cc1 -pg -mnop-mcount -triple s390x-ibm-linux -emit-llvm -o - \4// RUN:   %s 2>&1 | FileCheck -check-prefix=NOMFENTRY %s5// RUN: %clang_cc1 -mfentry -mnop-mcount -triple s390x-ibm-linux -emit-llvm -o - \6// RUN:   %s 2>&1 | FileCheck -check-prefix=NOPG %s7// RUN: %clang_cc1 -mnop-mcount -triple s390x-ibm-linux -emit-llvm -o - %s \8// RUN:   2>&1 | FileCheck -check-prefix=NOPG %s9 10int foo(void) {11  return 0;12}13 14int __attribute__((no_instrument_function)) no_instrument(void) {15  return foo();16}17 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"{{.*}} }24