summaryrefslogtreecommitdiff
path: root/tools/llvm-readobj
diff options
context:
space:
mode:
authorNico Rieck <nico.rieck@gmail.com>2014-03-17 01:46:52 +0000
committerNico Rieck <nico.rieck@gmail.com>2014-03-17 01:46:52 +0000
commit717b36b1d60a8e5d155e8014901a8c93cce04777 (patch)
tree75f2efb791d1a5b6600798936de52b4da030b4f6 /tools/llvm-readobj
parent23653b1265439147c27893a6832a70c93d0623dc (diff)
llvm-readobj: Print referred symbol name for CLR token definition
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204024 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-readobj')
-rw-r--r--tools/llvm-readobj/COFFDumper.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/llvm-readobj/COFFDumper.cpp b/tools/llvm-readobj/COFFDumper.cpp
index 28ac3cb4164..34115f481ae 100644
--- a/tools/llvm-readobj/COFFDumper.cpp
+++ b/tools/llvm-readobj/COFFDumper.cpp
@@ -1058,10 +1058,19 @@ void COFFDumper::printSymbol(symbol_iterator SymI) {
if (error(getSymbolAuxData(Obj, Symbol + I, Aux)))
break;
+ const coff_symbol *ReferredSym;
+ StringRef ReferredName;
+ error_code EC;
+ if ((EC = Obj->getSymbol(Aux->SymbolTableIndex, ReferredSym)) ||
+ (EC = Obj->getSymbolName(ReferredSym, ReferredName))) {
+ ReferredName = "";
+ error(EC);
+ }
+
DictScope AS(W, "AuxCLRToken");
W.printNumber("AuxType", Aux->AuxType);
W.printNumber("Reserved", Aux->Reserved);
- W.printNumber("SymbolTableIndex", Aux->SymbolTableIndex);
+ W.printNumber("SymbolTableIndex", ReferredName, Aux->SymbolTableIndex);
W.printBinary("Unused", Aux->Unused);
} else {