summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2008-12-20 19:17:01 +0000
committerFariborz Jahanian <fjahanian@apple.com>2008-12-20 19:17:01 +0000
commit7acf0749d45584f0984e174c763505920faebcf9 (patch)
tree06d327e4a51254121b1838d8167ae602c79da66f /clang/lib/AST
parentab316350bfe4b17b404cace73c0d77f0d6d09a63 (diff)
downloadbcm5719-llvm-7acf0749d45584f0984e174c763505920faebcf9.tar.gz
bcm5719-llvm-7acf0749d45584f0984e174c763505920faebcf9.zip
Strangely enough, name of ObjC class is not encoded into the
full encoding of the class which has an ivar of pointer to this class. Its name is encoded in the type for the ivar in the ivar-list metadata. This patch conforms to the above rule. llvm-svn: 61282
Diffstat (limited to 'clang/lib/AST')
-rw-r--r--clang/lib/AST/ASTContext.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index c50a0210282..d03ed41a152 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -1795,10 +1795,12 @@ void ASTContext::getObjCEncodingForTypeImpl(QualType T, std::string& S,
}
else if (PointeeTy->isObjCInterfaceType()) {
S += '@';
- ObjCInterfaceDecl *OI = PointeeTy->getAsObjCInterfaceType()->getDecl();
- S += '"';
- S += OI->getNameAsCString();
- S += '"';
+ if (FD) {
+ ObjCInterfaceDecl *OI = PointeeTy->getAsObjCInterfaceType()->getDecl();
+ S += '"';
+ S += OI->getNameAsCString();
+ S += '"';
+ }
return;
} else if (isObjCClassType(PointeeTy)) {
S += '#';
OpenPOWER on IntegriCloud