[cfe-commits] r151316 - /cfe/trunk/test/Rewriter/objc-modern-ivar-receiver-1.mm
Fariborz Jahanian
fjahanian at apple.com
Thu Feb 23 16:34:58 PST 2012
Author: fjahanian
Date: Thu Feb 23 18:34:58 2012
New Revision: 151316
URL: http://llvm.org/viewvc/llvm-project?rev=151316&view=rev
Log:
Add an ivar test for modern objc abi translator.
Added:
cfe/trunk/test/Rewriter/objc-modern-ivar-receiver-1.mm
Added: cfe/trunk/test/Rewriter/objc-modern-ivar-receiver-1.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Rewriter/objc-modern-ivar-receiver-1.mm?rev=151316&view=auto
==============================================================================
--- cfe/trunk/test/Rewriter/objc-modern-ivar-receiver-1.mm (added)
+++ cfe/trunk/test/Rewriter/objc-modern-ivar-receiver-1.mm Thu Feb 23 18:34:58 2012
@@ -0,0 +1,28 @@
+// RUN: %clang_cc1 -E %s -o %t.mm
+// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %t.mm -o - | FileCheck %s
+
+void *sel_registerName(const char *);
+
+ at interface NSMutableArray
+- (void)addObject:(id)addObject;
+ at end
+
+ at interface NSInvocation {
+ at private
+ id _container;
+}
++ (NSInvocation *)invocationWithMethodSignature;
+
+ at end
+
+ at implementation NSInvocation
+
++ (NSInvocation *)invocationWithMethodSignature {
+ NSInvocation *newInv;
+ id obj = newInv->_container;
+ [newInv->_container addObject:0];
+ return 0;
+}
+ at end
+
+// CHECK: id obj = (*(id *)((char *)newInv + OBJC_IVAR_$_NSInvocation__container));
More information about the cfe-commits
mailing list