Author: fjahanian
Date: Mon Feb 16 15:41:04 2009
New Revision: 64672

URL: http://llvm.org/viewvc/llvm-project?rev=64672&view=rev
Log:
Fixes a bug in property type encoding.

Added:
    cfe/trunk/test/CodeGenObjC/objc2-property-encode.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=64672&r1=64671&r2=64672&view=diff

==============================================================================
--- cfe/trunk/lib/AST/ASTContext.cpp (original)
+++ cfe/trunk/lib/AST/ASTContext.cpp Mon Feb 16 15:41:04 2009
@@ -2085,7 +2085,8 @@
       return;
     }
     else if (PointeeTy->isObjCInterfaceType()) {
-      if (dyn_cast<TypedefType>(PointeeTy.getTypePtr())) {
+      if (!EncodingProperty &&
+          dyn_cast<TypedefType>(PointeeTy.getTypePtr())) {
         // Another historical/compatibility reason.
         // We encode the underlying type which comes out as 
         // {...};

Added: cfe/trunk/test/CodeGenObjC/objc2-property-encode.m
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/objc2-property-encode.m?rev=64672&view=auto

==============================================================================
--- cfe/trunk/test/CodeGenObjC/objc2-property-encode.m (added)
+++ cfe/trunk/test/CodeGenObjC/objc2-property-encode.m Mon Feb 16 15:41:04 2009
@@ -0,0 +1,13 @@
+// RUN: clang -triple=i686-apple-darwin9 -fnext-runtime -emit-llvm -o %t %s &&
+// RUN: grep -e "t...@\\\\22nsstring\\\\22" %t
+...@interface NSString @end
+
+typedef NSString StoreVersionID ;
+
+...@interface Parent 
+  @property(retain) StoreVersionID* foo;
+...@end
+
+...@implementation Parent
+...@dynamic foo;
+...@end


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to