brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · b73278d Raw
35 lines · c
1// RUN: %clang_cc1 -debug-info-kind=standalone -emit-llvm -o - %s -finstrument-functions -disable-llvm-passes | FileCheck %s2// RUN: %clang_cc1 -debug-info-kind=standalone -emit-llvm -o - %s -finstrument-function-entry-bare -disable-llvm-passes | FileCheck -check-prefix=BARE %s3 4int test1(int x) {5// CHECK: @test1(i32 {{.*}}%x) #[[ATTR1:[0-9]+]]6// CHECK: ret7 8// BARE: @test1(i32 {{.*}}%x) #[[ATTR1:[0-9]+]]9// BARE: ret10  return x;11}12 13int test2(int) __attribute__((no_instrument_function));14int test2(int x) {15// CHECK: @test2(i32 {{.*}}%x) #[[ATTR2:[0-9]+]]16// CHECK: ret17 18// BARE: @test2(i32 {{.*}}%x) #[[ATTR2:[0-9]+]]19// BARE: ret20  return x;21}22 23// CHECK: attributes #[[ATTR1]] =24// CHECK-SAME: "instrument-function-entry"="__cyg_profile_func_enter"25// CHECK-SAME: "instrument-function-exit"="__cyg_profile_func_exit"26 27// BARE: attributes #[[ATTR1]] =28// BARE-SAME: "instrument-function-entry-inlined"="__cyg_profile_func_enter_bare"29 30// CHECK: attributes #[[ATTR2]] =31// CHECK-NOT: "instrument-function-entry"32 33// BARE: attributes #[[ATTR2]] =34// BARE-NOT: "instrument-function-entry"35