1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 %s -emit-llvm -o - | FileCheck %s 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambuc// CHECK: @"__func__.-[Foo instanceTest1]" = private unnamed_addr constant [21 x i8] c"-[Foo instanceTest1]\00" 4*f4a2713aSLionel Sambuc// CHECK: @"__func__.-[Foo instanceTest2:]" = private unnamed_addr constant [22 x i8] c"-[Foo instanceTest2:]\00" 5*f4a2713aSLionel Sambuc// CHECK: @"__func__.-[Foo instanceTest3:withB:]" = private unnamed_addr constant [28 x i8] c"-[Foo instanceTest3:withB:]\00" 6*f4a2713aSLionel Sambuc// CHECK: @"__func__.-[Foo instanceTest4]" = private unnamed_addr constant [21 x i8] c"-[Foo instanceTest4]\00" 7*f4a2713aSLionel Sambuc// CHECK: @"__func__.+[Foo classTest1]" = private unnamed_addr constant [18 x i8] c"+[Foo classTest1]\00" 8*f4a2713aSLionel Sambuc// CHECK: @"__func__.+[Foo classTest2:]" = private unnamed_addr constant [19 x i8] c"+[Foo classTest2:]\00" 9*f4a2713aSLionel Sambuc// CHECK: @"__func__.+[Foo classTest3:withB:]" = private unnamed_addr constant [25 x i8] c"+[Foo classTest3:withB:]\00" 10*f4a2713aSLionel Sambuc// CHECK: @"__func__.+[Foo classTest4]" = private unnamed_addr constant [18 x i8] c"+[Foo classTest4]\00" 11*f4a2713aSLionel Sambuc// CHECK: @"__func__.-[Foo(Category) instanceTestWithCategory]" = private unnamed_addr constant [42 x i8] c"-[Foo(Category) instanceTestWithCategory]\00" 12*f4a2713aSLionel Sambuc// CHECK: @"__func__.+[Foo(Category) classTestWithCategory]" = private unnamed_addr constant [39 x i8] c"+[Foo(Category) classTestWithCategory]\00" 13*f4a2713aSLionel Sambuc 14*f4a2713aSLionel Sambucint printf(const char * _Format, ...); 15*f4a2713aSLionel Sambuc 16*f4a2713aSLionel Sambuc@interface Foo 17*f4a2713aSLionel Sambuc@end 18*f4a2713aSLionel Sambuc 19*f4a2713aSLionel Sambuc@implementation Foo 20*f4a2713aSLionel Sambuc 21*f4a2713aSLionel Sambuc- (void)instanceTest1 { 22*f4a2713aSLionel Sambuc printf("__func__: %s\n", __func__); 23*f4a2713aSLionel Sambuc printf("__FUNCTION__: %s\n", __FUNCTION__); 24*f4a2713aSLionel Sambuc printf("__PRETTY_FUNCTION__: %s\n\n", __PRETTY_FUNCTION__); 25*f4a2713aSLionel Sambuc} 26*f4a2713aSLionel Sambuc 27*f4a2713aSLionel Sambuc- (void)instanceTest2:(int)i { 28*f4a2713aSLionel Sambuc printf("__func__: %s\n", __func__); 29*f4a2713aSLionel Sambuc printf("__FUNCTION__: %s\n", __FUNCTION__); 30*f4a2713aSLionel Sambuc printf("__PRETTY_FUNCTION__: %s\n\n", __PRETTY_FUNCTION__); 31*f4a2713aSLionel Sambuc} 32*f4a2713aSLionel Sambuc 33*f4a2713aSLionel Sambuc- (void)instanceTest3:(int)a withB:(double)b { 34*f4a2713aSLionel Sambuc printf("__func__: %s\n", __func__); 35*f4a2713aSLionel Sambuc printf("__FUNCTION__: %s\n", __FUNCTION__); 36*f4a2713aSLionel Sambuc printf("__PRETTY_FUNCTION__: %s\n\n", __PRETTY_FUNCTION__); 37*f4a2713aSLionel Sambuc} 38*f4a2713aSLionel Sambuc 39*f4a2713aSLionel Sambuc- (int)instanceTest4 { 40*f4a2713aSLionel Sambuc printf("__func__: %s\n", __func__); 41*f4a2713aSLionel Sambuc printf("__FUNCTION__: %s\n", __FUNCTION__); 42*f4a2713aSLionel Sambuc printf("__PRETTY_FUNCTION__: %s\n\n", __PRETTY_FUNCTION__); 43*f4a2713aSLionel Sambuc return 0; 44*f4a2713aSLionel Sambuc} 45*f4a2713aSLionel Sambuc 46*f4a2713aSLionel Sambuc+ (void)classTest1 { 47*f4a2713aSLionel Sambuc printf("__func__: %s\n", __func__); 48*f4a2713aSLionel Sambuc printf("__FUNCTION__: %s\n", __FUNCTION__); 49*f4a2713aSLionel Sambuc printf("__PRETTY_FUNCTION__: %s\n\n", __PRETTY_FUNCTION__); 50*f4a2713aSLionel Sambuc} 51*f4a2713aSLionel Sambuc 52*f4a2713aSLionel Sambuc+ (void)classTest2:(int)i { 53*f4a2713aSLionel Sambuc printf("__func__: %s\n", __func__); 54*f4a2713aSLionel Sambuc printf("__FUNCTION__: %s\n", __FUNCTION__); 55*f4a2713aSLionel Sambuc printf("__PRETTY_FUNCTION__: %s\n\n", __PRETTY_FUNCTION__); 56*f4a2713aSLionel Sambuc} 57*f4a2713aSLionel Sambuc 58*f4a2713aSLionel Sambuc+ (void)classTest3:(int)a withB:(double)b { 59*f4a2713aSLionel Sambuc printf("__func__: %s\n", __func__); 60*f4a2713aSLionel Sambuc printf("__FUNCTION__: %s\n", __FUNCTION__); 61*f4a2713aSLionel Sambuc printf("__PRETTY_FUNCTION__: %s\n\n", __PRETTY_FUNCTION__); 62*f4a2713aSLionel Sambuc} 63*f4a2713aSLionel Sambuc 64*f4a2713aSLionel Sambuc+ (int)classTest4 { 65*f4a2713aSLionel Sambuc printf("__func__: %s\n", __func__); 66*f4a2713aSLionel Sambuc printf("__FUNCTION__: %s\n", __FUNCTION__); 67*f4a2713aSLionel Sambuc printf("__PRETTY_FUNCTION__: %s\n\n", __PRETTY_FUNCTION__); 68*f4a2713aSLionel Sambuc return 0; 69*f4a2713aSLionel Sambuc} 70*f4a2713aSLionel Sambuc 71*f4a2713aSLionel Sambuc@end 72*f4a2713aSLionel Sambuc 73*f4a2713aSLionel Sambuc@interface Foo (Category) 74*f4a2713aSLionel Sambuc@end 75*f4a2713aSLionel Sambuc 76*f4a2713aSLionel Sambuc@implementation Foo (Category) 77*f4a2713aSLionel Sambuc 78*f4a2713aSLionel Sambuc- (void)instanceTestWithCategory { 79*f4a2713aSLionel Sambuc printf("__func__: %s\n", __func__); 80*f4a2713aSLionel Sambuc printf("__FUNCTION__: %s\n", __FUNCTION__); 81*f4a2713aSLionel Sambuc printf("__PRETTY_FUNCTION__: %s\n\n", __PRETTY_FUNCTION__); 82*f4a2713aSLionel Sambuc} 83*f4a2713aSLionel Sambuc 84*f4a2713aSLionel Sambuc+ (void)classTestWithCategory { 85*f4a2713aSLionel Sambuc printf("__func__: %s\n", __func__); 86*f4a2713aSLionel Sambuc printf("__FUNCTION__: %s\n", __FUNCTION__); 87*f4a2713aSLionel Sambuc printf("__PRETTY_FUNCTION__: %s\n\n", __PRETTY_FUNCTION__); 88*f4a2713aSLionel Sambuc} 89*f4a2713aSLionel Sambuc 90*f4a2713aSLionel Sambuc@end 91