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