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