[cfe-commits] r64672 - in /cfe/trunk: lib/AST/ASTContext.cpp test/CodeGenObjC/objc2-property-encode.m
Fariborz Jahanian
fjahanian at apple.com
Mon Feb 16 13:41:04 PST 2009
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
+ at interface NSString @end
+
+typedef NSString StoreVersionID ;
+
+ at interface Parent
+ @property(retain) StoreVersionID* foo;
+ at end
+
+ at implementation Parent
+ at dynamic foo;
+ at end
More information about the cfe-commits
mailing list