1*f4a2713aSLionel Sambuc// Check that we warn, but accept, -fobjc-gc for iPhone OS. 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambuc// RUN: %clang -target i386-apple-darwin9 -miphoneos-version-min=3.0 -fobjc-gc -flto -S -o %t %s 2> %t.err 4*f4a2713aSLionel Sambuc// RUN: FileCheck --check-prefix=IPHONE_OBJC_GC_LL %s < %t 5*f4a2713aSLionel Sambuc// RUN: FileCheck --check-prefix=IPHONE_OBJC_GC_STDERR %s < %t.err 6*f4a2713aSLionel Sambuc 7*f4a2713aSLionel Sambuc// IPHONE_OBJC_GC_LL: define void @f0 8*f4a2713aSLionel Sambuc// IPHONE_OBJC_GC_LL-NOT: objc_assign_ivar 9*f4a2713aSLionel Sambuc// IPHONE_OBJC_GC_LL: } 10*f4a2713aSLionel Sambuc 11*f4a2713aSLionel Sambuc// IPHONE_OBJC_GC_STDERR: warning: Objective-C garbage collection is not supported on this platform, ignoring '-fobjc-gc' 12*f4a2713aSLionel Sambuc 13*f4a2713aSLionel Sambuc@interface A { 14*f4a2713aSLionel Sambuc@public 15*f4a2713aSLionel Sambuc id x; 16*f4a2713aSLionel Sambuc} 17*f4a2713aSLionel Sambuc@end 18*f4a2713aSLionel Sambuc 19*f4a2713aSLionel Sambucvoid f0(A *a, id x) { a->x = x; } 20