[PATCH] D72973: using symbol index+symbol name + storage mapping class as label for llvm-objdump -D

Digger via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 20 10:20:29 PST 2020


DiggerLin marked 3 inline comments as done.
DiggerLin added inline comments.


================
Comment at: llvm/include/llvm/MC/MCDisassembler/MCDisassembler.h:23
 	StringRef Name;
-	uint8_t   Type;
+        int16_t TypeOrSmc; ///< For Elf, it stores the symbol type.
+                           ///< for XCOFF, it store storage mapping class of
----------------
jasonliu wrote:
> The indentation looks off here.  
I used the git-clang-format on the file, after that it looks like it. in my linux , the indentation look well, I am not sure whether it is the web related.


================
Comment at: llvm/include/llvm/MC/MCDisassembler/MCDisassembler.h:35
         friend bool operator<(const SymbolInfoTy &P1, const SymbolInfoTy &P2) {
-          return std::tie(P1.Addr, P1.Name, P1.Type) <
-                 std::tie(P2.Addr, P2.Name, P2.Type);
+          return std::tie(P1.Addr, P1.Name, P1.TypeOrSmc) <
+                 std::tie(P2.Addr, P2.Name, P2.TypeOrSmc);
----------------
jasonliu wrote:
> Should we add member "Index" here?
I do not think there is any symbol that has the same the symbol address , symbol name and symbol type with different symbol index. So we do not need to add Index here


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72973





More information about the llvm-commits mailing list