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