[PATCH] D78387: [AIX][XCOFF] add symbol priority for the llvm-objdump -D -symbol-description
Digger via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 8 07:28:49 PDT 2020
DiggerLin marked 5 inline comments as done.
DiggerLin added a comment.
In D78387#2014592 <https://reviews.llvm.org/D78387#2014592>, @jhenderson wrote:
> There seems to be quite a lot of new code here, but only one minor test change. The MCDisassembler ordering stuff looks like a prime candidate for gtest unit-testing. You could probably fairly easily unit-test the SymbolInfoTy comparison method too.
we will change all the test cases which has "llvm-objdump -D" to "llvm-objdump -D -symbol-description" . and "llvm-objdump --disassemble" to "llvm-objdump --disassemble -symbol-description"
in new patch. I think there will enough test change in the that patch.
================
Comment at: llvm/lib/MC/MCDisassembler/MCDisassembler.cpp:81
+/// The symbols in the same section are sorted in ascending order.
+/// llvm-objdump -D will choose high priority symbol to display when there are
+/// symbols with the same address.
----------------
jhenderson wrote:
> the highest priority symbol
thanks
================
Comment at: llvm/lib/MC/MCDisassembler/MCDisassembler.cpp:85
+bool XCOFFSymbolInfo::operator<(const XCOFFSymbolInfo &SymInfo) const {
+ // Compare Label first. If the symbol is not a label, it is lower than label
+ // symbol.
----------------
jhenderson wrote:
> I think the following is a little clearer: "Label symbols have higher priorty than non-label symbols."
thanks
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78387/new/
https://reviews.llvm.org/D78387
More information about the llvm-commits
mailing list