[PATCH] D77640: [llvm-objdump] Fix unstable disassembly output for sections with same address

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 7 05:23:05 PDT 2020


grimar added inline comments.


================
Comment at: llvm/test/tools/llvm-objdump/X86/disassemble-same-section-addr.test:26
+    Flags:   [SHF_ALLOC, SHF_EXECINSTR]
+    Address: 0
+    Content: e800000000 # Call instruction to next address.
----------------
Would be more natural to have VAs encoded in hex: 0x0 here and 0x5 below.


================
Comment at: llvm/tools/llvm-objdump/llvm-objdump.cpp:1231
     SectionAddresses.emplace_back(Sec.getAddress(), Sec);
-  stable_sort(SectionAddresses);
+  stable_sort(SectionAddresses, [](const std::pair<uint64_t, SectionRef> &LHS,
+                                   const std::pair<uint64_t, SectionRef> &RHS) {
----------------
`stable_sort`->`llvm::stable_sort` I think (while you are here) as usually (probably always)
algorithm invocations like this include `std::` or `llvm::` prefixes.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77640/new/

https://reviews.llvm.org/D77640





More information about the llvm-commits mailing list