41 lines · plain
1// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s2 3@interface NSObject @end4 5@class NSString;6 7int __CFConstantStringClassReference[24];8 9@interface Bar : NSObject10+(void)format:(NSString *)format,...;11@end12 13@interface Foo : NSObject14@end15 16 17static inline void _inlineFunction(void) {18 [Bar format:@" "];19}20 21@implementation Foo22 23 24+(NSString *)someMethod {25 return @"";26}27 28-(void)someMethod {29 _inlineFunction();30}31@end32 33// CHECK: @__CFConstantStringClassReference ={{.*}} global [24 x i32] zeroinitializer, align 1634// CHECK: @_unnamed_cfstring_{{.*}} = private global %struct.__NSConstantString_tag { ptr @__CFConstantStringClassReference35 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 void41