Last patch, for now, to privde ObjC's encoding of types.
We now pass all gcc's encoding compatibility tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61387 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index b9514f3..c5b4517 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -1859,6 +1859,16 @@
return;
}
else if (PointeeTy->isObjCInterfaceType()) {
+ if (dyn_cast<TypedefType>(PointeeTy.getTypePtr())) {
+ // Another historical/compatibility reason.
+ // We encode the underlying type which comes out as
+ // {...};
+ S += '^';
+ getObjCEncodingForTypeImpl(PointeeTy, S,
+ false, ExpandPointedToStructures,
+ NULL);
+ return;
+ }
S += '@';
if (FD) {
ObjCInterfaceDecl *OI = PointeeTy->getAsObjCInterfaceType()->getDecl();