1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-arc -std=c++11 -emit-llvm -o - %s | FileCheck %s 2 // rdar://16299964 3 4 @interface NSObject 5 + (id)new; 6 @end 7 8 @interface NSMutableDictionary : NSObject 9 @end 10 11 class XClipboardDataSet 12 { 13 NSMutableDictionary* mClipData = [NSMutableDictionary new]; 14 }; 15 16 @interface AppDelegate @end 17 18 @implementation AppDelegate 19 - (void)applicationDidFinishLaunching 20 { 21 XClipboardDataSet clip; 22 } 23 @end 24 25 // CHECK: [[mClipData:%.*]] = getelementptr inbounds %class.XClipboardDataSet, %class.XClipboardDataSet* 26 // CHECK: [[ZERO:%.*]] = load %struct._class_t*, %struct._class_t** @"OBJC_CLASSLIST_REFERENCES_$_" 27 // CHECK: [[ONE:%.*]] = load i8*, i8** @OBJC_SELECTOR_REFERENCES_ 28 // CHECK: [[TWO:%.*]] = bitcast %struct._class_t* [[ZERO]] to i8* 29 // CHECK: [[CALL:%.*]] = call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* [[TWO]], i8* [[ONE]]) 30 // CHECK: [[THREE:%.*]] = bitcast i8* [[CALL]] to [[T:%.*]]* 31 // CHECK: store [[T]]* [[THREE]], [[T]]** [[mClipData]], align 8 32 33 // rdar://18950072 34 struct Butt { }; 35 36 __attribute__((objc_root_class)) 37 @interface Foo { 38 Butt x; 39 Butt y; 40 Butt z; 41 } 42 @end 43 @implementation Foo 44 @end 45 // CHECK-NOT: define internal i8* @"\01-[Foo .cxx_construct 46