1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fdebugger-objc-literal -emit-llvm -o - %s | FileCheck %s 2 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fdebugger-objc-literal -emit-llvm -o - %s -DINCLUDE_INTERFACES=1 | FileCheck %s 3 4 // We need two different RUN lines here because the first time a class/method is absent, 5 // it will be added for -fdebugger-objc-literal. 6 7 #ifdef INCLUDE_INTERFACES 8 @interface NSObject 9 @end 10 11 @interface NSNumber : NSObject 12 @end 13 14 @interface NSArray : NSObject 15 @end 16 17 @interface NSDictionary : NSObject 18 @end 19 20 @interface NSString : NSObject 21 @end 22 #endif 23 24 int main() { 25 // object literals. 26 id l; 27 l = @'a'; 28 l = @42; 29 l = @-42; 30 l = @42u; 31 l = @3.141592654f; 32 l = @__objc_yes; 33 l = @__objc_no; 34 l = @{ @"name":@666 }; 35 l = @[ @"foo", @"bar" ]; 36 37 #if __has_feature(objc_boxed_expressions) 38 // boxed expressions. 39 id b; 40 b = @('a'); 41 b = @(42); 42 b = @(-42); 43 b = @(42u); 44 b = @(3.141592654f); 45 b = @(__objc_yes); 46 b = @(__objc_no); 47 b = @("hello"); 48 #else 49 #error "boxed expressions not supported" 50 #endif 51 } 52 53 // CHECK: declare i8* @objc_msgSend(i8*, i8*, ...) [[NLB:#[0-9]+]] 54 55 // CHECK: attributes [[NLB]] = { nonlazybind } 56