forked from OSchip/llvm-project
Anonymous structures print as '?=' in Obj-C type encoding.
llvm-svn: 57674
This commit is contained in:
parent
08acb24225
commit
40cac777b9
|
@ -1679,7 +1679,12 @@ void ASTContext::getObjCEncodingForType(QualType T, std::string& S,
|
|||
bool inlining = (S.size() == 1 && S[0] == '^' ||
|
||||
S.size() > 1 && S[S.size()-1] != '^');
|
||||
S += '{';
|
||||
S += RDecl->getName();
|
||||
// Anonymous structures print as '?'
|
||||
if (const IdentifierInfo *II = RDecl->getIdentifier()) {
|
||||
S += II->getName();
|
||||
} else {
|
||||
S += '?';
|
||||
}
|
||||
bool found = false;
|
||||
for (unsigned i = 0, e = ERType.size(); i != e; ++i)
|
||||
if (ERType[i] == RTy) {
|
||||
|
|
Loading…
Reference in New Issue