Print more symbol info in relocation printing when --symbol-description is specified.
Details
Diff Detail
Event Timeline
llvm/tools/llvm-objdump/XCOFFDump.cpp | ||
---|---|---|
38 | SymName is a std::string . It should be |
llvm/tools/llvm-objdump/XCOFFDump.cpp | ||
---|---|---|
74–76 | This part can be done with Twine, realizing the string at the point of the assignment. | |
78 | To reduce the amount of std::string operations, the append of this could be moved into the concatenation in the if above and an append in an else. Even if we were to have this line, it should use the StringRef iterators directly. | |
84–86 | Same comment regarding Twine. |
LGTM with minor comment. The output looks great; thanks!
llvm/tools/llvm-objdump/XCOFFDump.cpp | ||
---|---|---|
82 | I said "append", and I meant it. With Result.append(SymbolName.begin(), SymbolName.end()), if the string is small, only one copy would be done (as opposed to two, plus move operation overhead). If the string is long, then we still save on the move operation. |
llvm/tools/llvm-objdump/XCOFFDump.cpp | ||
---|---|---|
82 | Thanks for the detailed explanation. Addressed in the commit. |
nit: space align