xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/instrument-functions.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -S -emit-llvm -o - %s -finstrument-functions | FileCheck %s
2*f4a2713aSLionel Sambuc 
3*f4a2713aSLionel Sambuc // CHECK: @test1
test1(int x)4*f4a2713aSLionel Sambuc int test1(int x) {
5*f4a2713aSLionel Sambuc // CHECK: __cyg_profile_func_enter
6*f4a2713aSLionel Sambuc // CHECK: __cyg_profile_func_exit
7*f4a2713aSLionel Sambuc // CHECK: ret
8*f4a2713aSLionel Sambuc   return x;
9*f4a2713aSLionel Sambuc }
10*f4a2713aSLionel Sambuc 
11*f4a2713aSLionel Sambuc // CHECK: @test2
12*f4a2713aSLionel Sambuc int test2(int) __attribute__((no_instrument_function));
test2(int x)13*f4a2713aSLionel Sambuc int test2(int x) {
14*f4a2713aSLionel Sambuc // CHECK-NOT: __cyg_profile_func_enter
15*f4a2713aSLionel Sambuc // CHECK-NOT: __cyg_profile_func_exit
16*f4a2713aSLionel Sambuc // CHECK: ret
17*f4a2713aSLionel Sambuc   return x;
18*f4a2713aSLionel Sambuc }
19