Improve DeclContextPrinter: print enum name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62140 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/ASTConsumers.cpp b/Driver/ASTConsumers.cpp
index 17763f6..5bafd09 100644
--- a/Driver/ASTConsumers.cpp
+++ b/Driver/ASTConsumers.cpp
@@ -586,9 +586,15 @@
     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())