| 1 |
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s |
| 2 |
|
| 3 |
@interface NSObject @end |
| 4 |
|
| 5 |
@class NSString; |
| 6 |
|
| 7 |
int __CFConstantStringClassReference[24]; |
| 8 |
|
| 9 |
@interface Bar : NSObject |
| 10 |
+(void)format:(NSString *)format,...; |
| 11 |
@end |
| 12 |
|
| 13 |
@interface Foo : NSObject |
| 14 |
@end |
| 15 |
|
| 16 |
|
| 17 |
static inline void _inlineFunction(void) { |
| 18 |
[Bar format:@" "]; |
| 19 |
} |
| 20 |
|
| 21 |
@implementation Foo |
| 22 |
|
| 23 |
|
| 24 |
+(NSString *)someMethod { |
| 25 |
return @""; |
| 26 |
} |
| 27 |
|
| 28 |
-(void)someMethod { |
| 29 |
_inlineFunction(); |
| 30 |
} |
| 31 |
@end |
| 32 |
|
| 33 |
// CHECK: @__CFConstantStringClassReference ={{.*}} global [24 x i32] zeroinitializer, align 16 |
| 34 |
// CHECK: @_unnamed_cfstring_{{.*}} = private global %struct.__NSConstantString_tag { ptr @__CFConstantStringClassReference |
| 35 |
|
| 36 |
// CHECK-LABEL: define internal void @_inlineFunction() |
| 37 |
// CHECK: [[ZERO:%.*]] = load ptr, ptr @"OBJC_CLASSLIST_REFERENCES_ |
| 38 |
// CHECK-NEXT: [[SEL:%.*]] = load ptr, ptr @OBJC_SELECTOR_REFERENCES_ |
| 39 |
// CHECK-NEXT: call void (ptr, ptr, ptr, ...) @objc_msgSend(ptr noundef [[ZERO]], ptr noundef [[SEL]], ptr noundef @_unnamed_cfstring_{{.*}}) |
| 40 |
// CHECK-NEXT: ret void |