summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2016-05-03 00:45:14 +0000
committerReid Kleckner <rnk@google.com>2016-05-03 00:45:14 +0000
commitbc041b82d44b51a3b7da79c38e4052e28ff8011c (patch)
treecc0aa16318278a2bb337052cca0c0ed2e60466ee /llvm/tools
parent4df2666da18129c9cedd401def06d906a47f41c3 (diff)
downloadbcm5719-llvm-bc041b82d44b51a3b7da79c38e4052e28ff8011c.tar.gz
bcm5719-llvm-bc041b82d44b51a3b7da79c38e4052e28ff8011c.zip
[codeview] Maintain the type enum-to-classname mapping in the .def file
This way it will be easy to stamp out something like a type visitor. llvm-svn: 268347
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/llvm-readobj/COFFDumper.cpp28
1 files changed, 5 insertions, 23 deletions
diff --git a/llvm/tools/llvm-readobj/COFFDumper.cpp b/llvm/tools/llvm-readobj/COFFDumper.cpp
index 48e8178788b..e8acc1acea7 100644
--- a/llvm/tools/llvm-readobj/COFFDumper.cpp
+++ b/llvm/tools/llvm-readobj/COFFDumper.cpp
@@ -1955,29 +1955,11 @@ void COFFDumper::printFileNameForOffset(StringRef Label, uint32_t FileOffset) {
static StringRef getLeafTypeName(TypeLeafKind LT) {
switch (LT) {
- case LF_STRING_ID: return "StringId";
- case LF_FIELDLIST: return "FieldList";
- case LF_ARGLIST:
- case LF_SUBSTR_LIST: return "ArgList";
- case LF_CLASS:
- case LF_STRUCTURE:
- case LF_INTERFACE: return "ClassType";
- case LF_UNION: return "UnionType";
- case LF_ENUM: return "EnumType";
- case LF_ARRAY: return "ArrayType";
- case LF_VFTABLE: return "VFTableType";
- case LF_MFUNC_ID: return "MemberFuncId";
- case LF_PROCEDURE: return "ProcedureType";
- case LF_MFUNCTION: return "MemberFunctionType";
- case LF_METHODLIST: return "MethodListEntry";
- case LF_FUNC_ID: return "FuncId";
- case LF_TYPESERVER2: return "TypeServer2";
- case LF_POINTER: return "PointerType";
- case LF_MODIFIER: return "TypeModifier";
- case LF_VTSHAPE: return "VTableShape";
- case LF_UDT_SRC_LINE: return "UDTSrcLine";
- case LF_BUILDINFO: return "BuildInfo";
- default: break;
+#define KNOWN_TYPE(LeafName, Value, ClassName) \
+ case LeafName: return #ClassName;
+#include "llvm/DebugInfo/CodeView/CVLeafTypes.def"
+ default:
+ break;
}
return "UnknownLeaf";
}
OpenPOWER on IntegriCloud