[PATCH] D44558: Change DT_* value definitions to macros in a separate file

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 20 03:04:07 PDT 2018


grimar accepted this revision.
grimar added a comment.

LGTM



================
Comment at: tools/llvm-readobj/ELFDumper.cpp:1548
     switch (Type) {
-    LLVM_READOBJ_TYPE_CASE(HEXAGON_SYMSZ);
-    LLVM_READOBJ_TYPE_CASE(HEXAGON_VER);
-    LLVM_READOBJ_TYPE_CASE(HEXAGON_PLT);
+#define HEXAGON_DYNAMIC_TAG(name, value)                                       \
+  case DT_##name:                                                              \
----------------
arichardson wrote:
> grimar wrote:
> > Personally  to me one-line short form here and below looks easier to read:
> > 
> > ```
> > #define HEXAGON_DYNAMIC_TAG(name, value) case DT_##name: return #name;
> > ```
> This is what git-clang-format did to the file but I agree the short version is easier to understand. Fixed.
Ah :( We probably should go with formatted version then.
That's unfortunate.


Repository:
  rL LLVM

https://reviews.llvm.org/D44558





More information about the llvm-commits mailing list