diff options
author | dim <dim@FreeBSD.org> | 2011-06-12 15:46:16 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-06-12 15:46:16 +0000 |
commit | c49018d9cce52d8c9f34b44865ec3ba8e89a1488 (patch) | |
tree | c5e9e10bc189de0058aa763c47b9920a8351b7df /test/CodeGenObjC/debug-info-blocks.m | |
parent | 110eaaceddcec790f7e6a5e3bf1261c9aa1e73ab (diff) | |
download | FreeBSD-src-c49018d9cce52d8c9f34b44865ec3ba8e89a1488.zip FreeBSD-src-c49018d9cce52d8c9f34b44865ec3ba8e89a1488.tar.gz |
Vendor import of clang trunk r132879:
http://llvm.org/svn/llvm-project/cfe/trunk@132879
Diffstat (limited to 'test/CodeGenObjC/debug-info-blocks.m')
-rw-r--r-- | test/CodeGenObjC/debug-info-blocks.m | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/test/CodeGenObjC/debug-info-blocks.m b/test/CodeGenObjC/debug-info-blocks.m new file mode 100644 index 0000000..fc8e962 --- /dev/null +++ b/test/CodeGenObjC/debug-info-blocks.m @@ -0,0 +1,55 @@ +// REQUIRES: x86-64-registered-target +// 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; +} |