diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2008-12-23 21:30:15 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2008-12-23 21:30:15 +0000 |
| commit | 4ecf1e94dba1264243b0b3f4793a4763e04083fe (patch) | |
| tree | 4f2df7d03490891a4606b98b2a0bb4e12a9a8c07 /clang/lib/AST | |
| parent | 8b9ccca5e5f18910c83b7f12754e8bf446e06b27 (diff) | |
| download | bcm5719-llvm-4ecf1e94dba1264243b0b3f4793a4763e04083fe.tar.gz bcm5719-llvm-4ecf1e94dba1264243b0b3f4793a4763e04083fe.zip | |
Last patch, for now, to privde ObjC's encoding of types.
We now pass all gcc's encoding compatibility tests.
llvm-svn: 61387
Diffstat (limited to 'clang/lib/AST')
| -rw-r--r-- | clang/lib/AST/ASTContext.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index b9514f35a09..c5b451740a2 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -1859,6 +1859,16 @@ void ASTContext::getObjCEncodingForTypeImpl(QualType T, std::string& S, 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(); |

