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

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 14 15:02:44 PST 2018


probinson added a comment.

Note that the lower-bound might be implicit, but it's never "unknown."
We do need to account for the cases where the implicit lower-bound is 1. The Fortran people will need this, and the OpenVMS folks support several other languages that also have a default LB of 1.

Using `[C]` (C = count) for both the count-only and upper-bound-only cases suggests that we're being descriptive rather than carefully reflecting the attributes that are in the subrange DIE, which is fine.  So, if an explicit LB matches the language default, then the display should also be `[C]` (where C = count if we have a count, or C = U + (1 - L) if we have upper_bound).

We'd show two values `[L,U]` or `[L,C)` only if L was specified and non-default.  If we don't have either U or C, we get `[L,?)`.

How does that sound?


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