[cfe-commits] r65235 - in /cfe/trunk: lib/AST/ASTContext.cpp test/CodeGenObjC/objc2-weak-ivar.m

Fariborz Jahanian fjahanian at apple.com
Sat Feb 21 10:23:24 PST 2009


Author: fjahanian
Date: Sat Feb 21 12:23:24 2009
New Revision: 65235

URL: http://llvm.org/viewvc/llvm-project?rev=65235&view=rev
Log:
Fixed an ICE in meta-data generation of __weak/__strong ivars.

Added:
    cfe/trunk/test/CodeGenObjC/objc2-weak-ivar.m
Modified:
    cfe/trunk/lib/AST/ASTContext.cpp

Modified: cfe/trunk/lib/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=65235&r1=65234&r2=65235&view=diff

==============================================================================
--- cfe/trunk/lib/AST/ASTContext.cpp (original)
+++ cfe/trunk/lib/AST/ASTContext.cpp Sat Feb 21 12:23:24 2009
@@ -2151,7 +2151,8 @@
       }
       S += '@';
       if (FD || EncodingProperty) {
-        const ObjCInterfaceType *OIT = PointeeTy->getAsObjCInterfaceType();
+        const ObjCInterfaceType *OIT = 
+                PointeeTy.getUnqualifiedType()->getAsObjCInterfaceType();
         ObjCInterfaceDecl *OI = OIT->getDecl();
         S += '"';
         S += OI->getNameAsCString();

Added: cfe/trunk/test/CodeGenObjC/objc2-weak-ivar.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/objc2-weak-ivar.m?rev=65235&view=auto

==============================================================================
--- cfe/trunk/test/CodeGenObjC/objc2-weak-ivar.m (added)
+++ cfe/trunk/test/CodeGenObjC/objc2-weak-ivar.m Sat Feb 21 12:23:24 2009
@@ -0,0 +1,10 @@
+// RUN: clang -triple x86_64-unknown-unknown -fobjc-gc -emit-llvm -o %t %s
+ at class NSObject;
+
+ at interface Foo  {
+ at public
+  __weak NSObject *nsobject;
+}
+ at end
+
+ at implementation Foo @end





More information about the cfe-commits mailing list