[PATCH] D65537: Print reasonable representations of type names in llvm-nm, readelf and readobj.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 1 02:46:41 PDT 2019


grimar added a comment.

Well, my main concern is about `ElfSymbolTypes` array values representation.
I am not sure how my suggestion would affect the output, btw...



================
Comment at: include/llvm/Object/ELFObjectFile.h:45
+constexpr int NumElfSymbolTypes = 16;
 extern const llvm::EnumEntry<unsigned> ElfSymbolTypes[NumElfSymbolTypes];
 
----------------
not relative to this patch, but I wonder why this is not a vector. (I do not like having a `NumElfSymbolTypes`).


================
Comment at: lib/Object/ELFObjectFile.cpp:54
+    {"Proc Specific 14", "<processor specific>: 14", 14},
+    {"Proc Specific 15", "<processor specific>: 15", 15}
+};
----------------
It looks a bit confusing to me. When I see "Unknown 7" it looks like its a 7th `Unknown`.
What do you think about hte following format?

```
    {"Unknown(7)", "<unknown>(7)", 7},
    {"Unknown(8)", "<unknown>(8)", 8},
    {"Unknown(9)", "<unknown>(9)", 9},
    {"OS Specific(11)", "<OS specific>(11)", 11},
    {"OS Specific(12)", "<OS specific>(12)", 12},
    {"Proc Specific(13)", "<processor specific>(13)", 13},
    {"Proc Specific(14)", "<processor specific>(14)", 14},
    {"Proc Specific(15)", "<processor specific>(15)", 15}

```


Repository:
  rL LLVM

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

https://reviews.llvm.org/D65537





More information about the llvm-commits mailing list