[PATCH] D55721: llvm-dwarfdump: Improve/fix pretty printing of array dimensions
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 14 15:34:16 PST 2018
dblaikie added a comment.
In D55721#1331812 <https://reviews.llvm.org/D55721#1331812>, @probinson wrote:
> 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).
The only change you're suggesting is to detect when an explicit LB matches the language default, and treating that case the same as if the LB were not specified (in terms of how it's printed out)?
I'd say it's a nice improvement, but not a requirement & not sure the balance of encoding the lower bound defaults table from the DWARF spec is worth that improvement in printing? But I don't feel super strongly either way.
> 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