1// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
2__attribute((objc_root_class)) @interface NSObject {
3	id isa;
4}
5+ (id)alloc;
6- (id)init;
7- (id)retain;
8@end
9
10void NSLog(id, ...);
11
12@protocol MyProtocol
13
14-(const char *)hello;
15
16@end
17
18@interface MyClass : NSObject {
19}
20
21@property (nonatomic, assign) id <MyProtocol> bad_carrier;
22@property (nonatomic, assign) id good_carrier;
23
24@end
25
26@implementation MyClass
27@end
28
29int main()
30{
31    @autoreleasepool
32    {
33        MyClass *my_class = [MyClass alloc];
34        NSLog(@"%p\n", my_class.bad_carrier);
35        NSLog(@"%p\n", my_class.good_carrier);
36    }
37}
38// Verify that the debug type for both variables is 'id'.
39// CHECK:  ![[IDTYPE:[0-9]+]] = !DIDerivedType(tag: DW_TAG_typedef, name: "id"
40//
41// CHECK:  !DILocalVariable(name: "bad_carrier", arg:
42// CHECK-NOT:               line:
43// CHECK-SAME:              type: ![[IDTYPE]]
44//
45// CHECK:  !DILocalVariable(name: "good_carrier", arg:
46// CHECK-NOT:               line:
47// CHECK-SAME:              type: ![[IDTYPE]]
48