[cfe-commits] r131941 - /cfe/trunk/test/CodeGenObjC/debug-info-blocks.m

Devang Patel dpatel at apple.com
Mon May 23 17:22:40 PDT 2011


Author: dpatel
Date: Mon May 23 19:22:40 2011
New Revision: 131941

URL: http://llvm.org/viewvc/llvm-project?rev=131941&view=rev
Log:
Test case for r131940.

Added:
    cfe/trunk/test/CodeGenObjC/debug-info-blocks.m

Added: cfe/trunk/test/CodeGenObjC/debug-info-blocks.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-blocks.m?rev=131941&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-blocks.m (added)
+++ cfe/trunk/test/CodeGenObjC/debug-info-blocks.m Mon May 23 19:22:40 2011
@@ -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;
+
+ at protocol NSObject
+ at end  
+   
+ at interface NSObject <NSObject>
+- (id)init;
++ (id)alloc;
+ at end 
+
+ at interface NSDictionary : NSObject 
+- (NSUInteger)count;
+ at end    
+
+ at interface NSMutableDictionary : NSDictionary  
+ at end       
+
+ at interface A : NSObject {
+ at public
+    int ivar;
+}
+ at end
+
+static void run(void (^block)(void))
+{
+    block();
+}
+
+ at implementation A
+
+- (id)init
+{
+    if ((self = [super init])) {
+      run(^{
+          NSMutableDictionary *d = [[NSMutableDictionary alloc] init]; 
+          ivar = 42 + (int)[d count];
+        });
+    }
+    return self;
+}
+
+ at end
+
+int main()
+{
+	A *a = [[A alloc] init];
+	return 0;
+}





More information about the cfe-commits mailing list