brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 62aa857 Raw
56 lines · plain
1// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fdebugger-objc-literal -emit-llvm -o - %s | FileCheck %s2// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fdebugger-objc-literal -emit-llvm -o - %s -DINCLUDE_INTERFACES=1 | FileCheck %s3 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_INTERFACES8@interface NSObject9@end10 11@interface NSNumber : NSObject12@end13 14@interface NSArray : NSObject15@end16 17@interface NSDictionary : NSObject18@end19 20@interface NSString : NSObject21@end22#endif23 24int main(void) {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#else49#error "boxed expressions not supported"50#endif51}52 53// CHECK: declare ptr @objc_msgSend(ptr, ptr, ...) [[NLB:#[0-9]+]]54 55// CHECK: attributes [[NLB]] = { nonlazybind }56