Introduce Type::getTypeClassName() that returns the string associated with the TypeClass enum.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83090 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp
index bda06ac..c3eade2 100644
--- a/lib/AST/Type.cpp
+++ b/lib/AST/Type.cpp
@@ -668,6 +668,15 @@
   }
 }
 
+const char *Type::getTypeClassName() const {
+  switch (TC) {
+  default: assert(0 && "Type class not in TypeNodes.def!");
+#define ABSTRACT_TYPE(Derived, Base)
+#define TYPE(Derived, Base) case Derived: return #Derived;
+#include "clang/AST/TypeNodes.def"
+  }
+}
+
 const char *BuiltinType::getName(const LangOptions &LO) const {
   switch (getKind()) {
   default: assert(0 && "Unknown builtin type!");