[PATCH] D54114: Adding debug info to support Fortran (part 2)
John Reagan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 5 13:12:14 PST 2018
JohnReagan added inline comments.
================
Comment at: include/llvm/IR/DIBuilder.h:491
+ /// Create debugging information entry for a Fortran array.
+ /// \param Size Array size.
----------------
So what's the difference here between createArrayType and createFortranArrayType? They both take subranges for subscripts, yes? The size would be a run-time value if any of the subranges have non-constant values but your createFortranArrayType handles that case and can be folded in.
================
Comment at: include/llvm/IR/DIBuilder.h:582
+ /// Create a descriptor for a value range. This
+ /// implicitly uniques the values returned.
----------------
Why not
```
getOrCreateSubrangeWithCount(Metadata *Lo, Metadata *CountNode);
getOrCreateSubrangeWithUpper(Metadata *Lo, Metadata *Up);
```
or something like this? I can imagine where the Upper value is easier to describe than the Count. On VMS, our array descriptors have bounds information inside of them so the Lo/Up values are just "descriptor-base + offset". Trying to describe the count would involve generating code into a temp variable or using a more complex DWARF expression to fetch the Lo and Up and doing the arithmetic that way.
And your comments don't describe the arguments so perhaps I'm missing something.
Repository:
rL LLVM
https://reviews.llvm.org/D54114
More information about the llvm-commits
mailing list