Improve DeclContextPrinter: print enum name.

llvm-svn: 62140
This commit is contained in:
Zhongxing Xu 2009-01-13 02:41:08 +00:00
parent dec798bf37
commit 100f30bd0d
1 changed files with 8 additions and 2 deletions

View File

@ -586,9 +586,15 @@ void DeclContextPrinter::PrintDeclContext(const DeclContext* DC,
Out << ND->getNameAsString();
break;
}
case Decl::Enum:
Out << "[enum]";
case Decl::Enum: {
EnumDecl* ED = EnumDecl::castFromDeclContext(DC);
if (ED->isDefinition())
Out << "[enum] ";
else
Out << "<enum> ";
Out << ED->getNameAsString();
break;
}
case Decl::Record: {
RecordDecl* RD = RecordDecl::castFromDeclContext(DC);
if (RD->isDefinition())