Fixes a bug in property type encoding.

llvm-svn: 64672
This commit is contained in:
Fariborz Jahanian 2009-02-16 21:41:04 +00:00
parent e404d0ba05
commit 1dd6094517
2 changed files with 15 additions and 1 deletions

View File

@ -2085,7 +2085,8 @@ void ASTContext::getObjCEncodingForTypeImpl(QualType T, std::string& S,
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
// {...};

View File

@ -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