Print more symbol info in relocation printing when --symbol-description is specified.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/tools/llvm-objdump/XCOFFDump.cpp | ||
---|---|---|
37 | SymName is a std::string . It should be |
llvm/tools/llvm-objdump/XCOFFDump.cpp | ||
---|---|---|
73–74 | This part can be done with Twine, realizing the string at the point of the assignment. | |
74–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 | Same comment regarding Twine. |
LGTM with minor comment. The output looks great; thanks!
llvm/tools/llvm-objdump/XCOFFDump.cpp | ||
---|---|---|
78 | 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 | ||
---|---|---|
78 | Thanks for the detailed explanation. Addressed in the commit. |
nit: space align