1 // RUN: %clang_cc1 -S -emit-llvm -triple %itanium_abi_triple -o - %s -finstrument-functions | FileCheck %s
2 
3 // CHECK: @_Z5test1i
test1(int x)4 int test1(int x) {
5 // CHECK: __cyg_profile_func_enter
6 // CHECK: __cyg_profile_func_exit
7 // CHECK: ret
8   return x;
9 }
10 
11 // CHECK: @_Z5test2i
12 int test2(int) __attribute__((no_instrument_function));
test2(int x)13 int test2(int x) {
14 // CHECK-NOT: __cyg_profile_func_enter
15 // CHECK-NOT: __cyg_profile_func_exit
16 // CHECK: ret
17   return x;
18 }
19 
20 // This test case previously crashed code generation.  It exists solely
21 // to test -finstrument-function does not crash codegen for this trivial
22 // case.
23 namespace rdar9445102 {
24   class Rdar9445102 {
25     public:
26       Rdar9445102();
27   };
28 }
29 static rdar9445102::Rdar9445102 s_rdar9445102Initializer;
30 
31