1f4a2713aSLionel Sambuc// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -g %s -o - | FileCheck %s 2f4a2713aSLionel Sambuc__attribute((objc_root_class)) @interface NSObject { 3f4a2713aSLionel Sambuc id isa; 4f4a2713aSLionel Sambuc} 5f4a2713aSLionel Sambuc+ (id)alloc; 6f4a2713aSLionel Sambuc- (id)init; 7f4a2713aSLionel Sambuc- (id)retain; 8f4a2713aSLionel Sambuc@end 9f4a2713aSLionel Sambuc 10f4a2713aSLionel Sambucvoid NSLog(id, ...); 11f4a2713aSLionel Sambuc 12f4a2713aSLionel Sambuc@protocol MyProtocol 13f4a2713aSLionel Sambuc 14f4a2713aSLionel Sambuc-(const char *)hello; 15f4a2713aSLionel Sambuc 16f4a2713aSLionel Sambuc@end 17f4a2713aSLionel Sambuc 18f4a2713aSLionel Sambuc@interface MyClass : NSObject { 19f4a2713aSLionel Sambuc} 20f4a2713aSLionel Sambuc 21f4a2713aSLionel Sambuc@property (nonatomic, assign) id <MyProtocol> bad_carrier; 22f4a2713aSLionel Sambuc@property (nonatomic, assign) id good_carrier; 23f4a2713aSLionel Sambuc 24f4a2713aSLionel Sambuc@end 25f4a2713aSLionel Sambuc 26f4a2713aSLionel Sambuc@implementation MyClass 27f4a2713aSLionel Sambuc@end 28f4a2713aSLionel Sambuc 29f4a2713aSLionel Sambucint main() 30f4a2713aSLionel Sambuc{ 31f4a2713aSLionel Sambuc @autoreleasepool 32f4a2713aSLionel Sambuc { 33f4a2713aSLionel Sambuc MyClass *my_class = [MyClass alloc]; 34f4a2713aSLionel Sambuc NSLog(@"%p\n", my_class.bad_carrier); 35f4a2713aSLionel Sambuc NSLog(@"%p\n", my_class.good_carrier); 36f4a2713aSLionel Sambuc } 37f4a2713aSLionel Sambuc} 38f4a2713aSLionel Sambuc// Verify that the debug type for both variables is 'id'. 39*0a6a1f1dSLionel Sambuc// CHECK: !"0x101\00bad_carrier\00{{[0-9]+}}\000", !{{[0-9]+}}, null, ![[IDTYPE:[0-9]+]]} ; [ DW_TAG_arg_variable ] [bad_carrier] [line 0] 40*0a6a1f1dSLionel Sambuc// 41*0a6a1f1dSLionel Sambuc// CHECK: !"0x101\00good_carrier\00{{[0-9]+}}\000", !{{[0-9]+}}, null, ![[IDTYPE]]} ; [ DW_TAG_arg_variable ] [good_carrier] [line 0] 42*0a6a1f1dSLionel Sambuc// CHECK !{{.*}}[[IDTYPE]] = !{!"0x16\00id\00{{[0-9]+}}\000\000\000\000", null, !{{[0-9]+}}, !{{[0-9]+}}} ; [ DW_TAG_typedef ] [id] 43