diff options
author | Devang Patel <dpatel@apple.com> | 2011-05-24 00:22:40 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-05-24 00:22:40 +0000 |
commit | 433a11b95a49d85618bc4ad47ff6cc8bf7eb3875 (patch) | |
tree | 49fb9cd94929918c3651b35eedfac6a845e7097c /clang/test/CodeGenObjC/debug-info-blocks.m | |
parent | 354fa0798fe4023b98ba33d556925d895431afbd (diff) | |
download | llvm-433a11b95a49d85618bc4ad47ff6cc8bf7eb3875.zip llvm-433a11b95a49d85618bc4ad47ff6cc8bf7eb3875.tar.gz llvm-433a11b95a49d85618bc4ad47ff6cc8bf7eb3875.tar.bz2 |
Test case for r131940.
llvm-svn: 131941
Diffstat (limited to 'clang/test/CodeGenObjC/debug-info-blocks.m')
-rw-r--r-- | clang/test/CodeGenObjC/debug-info-blocks.m | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/clang/test/CodeGenObjC/debug-info-blocks.m b/clang/test/CodeGenObjC/debug-info-blocks.m new file mode 100644 index 0000000..70548570 --- /dev/null +++ b/clang/test/CodeGenObjC/debug-info-blocks.m @@ -0,0 +1,54 @@ +// RUN: %clang_cc1 -masm-verbose -S -fblocks -g -triple x86_64-apple-darwin10 -fobjc-nonfragile-abi -fobjc-dispatch-method=mixed %s -o - | FileCheck %s + +//Radar 9279956 +//CHECK: ## DW_OP_deref +//CHECK-NEXT: ## DW_OP_plus_uconst + +typedef unsigned int NSUInteger; + +@protocol NSObject +@end + +@interface NSObject <NSObject> +- (id)init; ++ (id)alloc; +@end + +@interface NSDictionary : NSObject +- (NSUInteger)count; +@end + +@interface NSMutableDictionary : NSDictionary +@end + +@interface A : NSObject { +@public + int ivar; +} +@end + +static void run(void (^block)(void)) +{ + block(); +} + +@implementation A + +- (id)init +{ + if ((self = [super init])) { + run(^{ + NSMutableDictionary *d = [[NSMutableDictionary alloc] init]; + ivar = 42 + (int)[d count]; + }); + } + return self; +} + +@end + +int main() +{ + A *a = [[A alloc] init]; + return 0; +} |