[cfe-commits] r57674 - /cfe/trunk/lib/AST/ASTContext.cpp
Daniel Dunbar
daniel at zuster.org
Thu Oct 16 23:22:57 PDT 2008
Author: ddunbar
Date: Fri Oct 17 01:22:57 2008
New Revision: 57674
URL: http://llvm.org/viewvc/llvm-project?rev=57674&view=rev
Log:
Anonymous structures print as '?=' in Obj-C type encoding.
Modified:
cfe/trunk/lib/AST/ASTContext.cpp
Modified: cfe/trunk/lib/AST/ASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTContext.cpp?rev=57674&r1=57673&r2=57674&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTContext.cpp (original)
+++ cfe/trunk/lib/AST/ASTContext.cpp Fri Oct 17 01:22:57 2008
@@ -1679,7 +1679,12 @@
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) {
More information about the cfe-commits
mailing list