[PATCH] D55721: llvm-dwarfdump: Improve/fix pretty printing of array dimensions

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 18 14:22:52 PST 2018


probinson added a comment.

A couple small things.  If Jonas is happy, I'm happy.



================
Comment at: lib/DebugInfo/DWARF/DWARFDie.cpp:157
 
+static void dumpArray(raw_ostream &OS, const DWARFDie &D) {
+  Optional<uint64_t> Bound;
----------------
`dumpArrayType` as it's not actually dumping an array of anything


================
Comment at: lib/DebugInfo/DWARF/DWARFDie.cpp:180
+        OS << "[]";
+      if (!LB && (Count || UB) && DefaultLB)
+        OS << '[' << (Count ? *Count : *UB - *DefaultLB + 1) << ']';
----------------
`else if` here? Otherwise it looks like the no-attributes-at-all case would dump
`[][[?,?)]` which  seems like overkill.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D55721





More information about the llvm-commits mailing list