[PATCH] D72843: [llvm-readelf][llvm-readobj] - Fix the indentation when printing dynamic tags.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 17 04:07:30 PST 2020


jhenderson added a comment.

In both cases, I'm struggling to follow why specific numbers are used, e.g. where does the "-1" "-3" etc come from?



================
Comment at: llvm/test/tools/llvm-readobj/ELF/dynamic-tags.test:585
+## When printing the "Name/Value" column we want to have the minimal possible indentation.
+## Use an arbitrary dynamic tag to demonstrate that.
+
----------------
"this" would be more natural than "that" here.


================
Comment at: llvm/test/tools/llvm-readobj/ELF/dynamic-tags.test:589
+# RUN: llvm-readobj --dynamic-table %t3 \
+# RUN:   | FileCheck %s --check-prefix=IDENT-LLVM-64 --strict-whitespace
+# RUN: llvm-readelf --dynamic-table %t3 \
----------------
IDENT -> INDENT here and below.


================
Comment at: llvm/tools/llvm-readobj/ELFDumper.cpp:5804
+
+  std::string ValueFmt = "%-" + std::to_string(MaxTagSize) + "s ";
   for (auto Entry : Table) {
----------------
Don't know if it really matters, but shouldn't one of these strings be converted to a `Twine`?


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

https://reviews.llvm.org/D72843





More information about the llvm-commits mailing list