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