[llvm-readobj] Print the resource type textually for .res files
This already is done when dumping resources from coff objects.
Differential Revision: https://reviews.llvm.org/D66816
llvm-svn: 370308
diff --git a/llvm/tools/llvm-readobj/WindowsResourceDumper.cpp b/llvm/tools/llvm-readobj/WindowsResourceDumper.cpp
index 13989f6..a2fb6aa 100644
--- a/llvm/tools/llvm-readobj/WindowsResourceDumper.cpp
+++ b/llvm/tools/llvm-readobj/WindowsResourceDumper.cpp
@@ -56,8 +56,12 @@
if (Ref.checkTypeString()) {
auto NarrowStr = stripUTF16(Ref.getTypeString());
SW.printString("Resource type (string)", NarrowStr);
- } else
- SW.printNumber("Resource type (int)", Ref.getTypeID());
+ } else {
+ SmallString<20> IDStr;
+ raw_svector_ostream OS(IDStr);
+ printResourceTypeName(Ref.getTypeID(), OS);
+ SW.printString("Resource type (int)", IDStr);
+ }
if (Ref.checkNameString()) {
auto NarrowStr = stripUTF16(Ref.getNameString());