This is an archive of the discontinued LLVM Phabricator instance.

Extensions to the LLVM debug information metadata to support the Fortran language.
AbandonedPublic

Authored by xoviat on Jan 29 2018, 3:13 PM.

Details

Reviewers
None
Summary

There are several new debug info constructs added here. They include the following.

!DIStringType :
Debug clients expect Fortran CHARACTER types to appear as
DW_TAG_string_type in the DWARF. !DIStringType can be used to generate
DWARF for constant and variable sized CHARACTER type variables. If the
size of a CHARACTER must be computed at run-time, DWARF specifies that
the DW_TAG_string_type has a DW_AT_string_length with a location expression.

!DIFortranArrayType and !DIFortranSubrange :
Debug clients expect Fortran arrays to specify the bounds of their
dimensions in DW_TAG_subrange_types. Both the lower and upper bounds can
be given by the programmer as constants, variables, a mix of constants
and variables, omitted, or as deferred. The DWARF standard requires
that these bounds appear in the DW_TAG_subrange_type. Debug clients
expect variable bounds to be encoded in blocks.

Diff Detail

Repository
rL LLVM

Event Timeline

xoviat created this revision.Jan 29 2018, 3:13 PM

Thank you very much for this patch!

In order to make this review manageable, could you please split out the review into one separate patch per feature you are adding?

There are no testcases covering the new features. Could you please add some?

Also note that we just recently extended DISubrange in LLVM: (see https://reviews.llvm.org/D41695 https://reviews.llvm.org/D41696 https://reviews.llvm.org/D41698). It would be good if your patch for Fortran array types could build on top of that.

I'll come back with a smaller patch.

xoviat abandoned this revision.Jan 29 2018, 4:01 PM