diff options
author | Adrian Prantl <aprantl@apple.com> | 2019-03-14 16:29:54 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2019-03-14 16:29:54 +0000 |
commit | e69917f16624d3d3531753a02291a6da9ef4befb (patch) | |
tree | 43a3783fcf5a2f503364f60e6bb957265e4a4a4c /llvm/docs/SourceLevelDebugging.rst | |
parent | 330ab33f7c137ad3debd813ab7e7599e44e19346 (diff) | |
download | bcm5719-llvm-e69917f16624d3d3531753a02291a6da9ef4befb.tar.gz bcm5719-llvm-e69917f16624d3d3531753a02291a6da9ef4befb.zip |
Add IR debug info support for Elemental, Pure, and Recursive Procedures.
Patch by Eric Schweitz!
Differential Revision: https://reviews.llvm.org/D54043
llvm-svn: 356163
Diffstat (limited to 'llvm/docs/SourceLevelDebugging.rst')
-rw-r--r-- | llvm/docs/SourceLevelDebugging.rst | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/llvm/docs/SourceLevelDebugging.rst b/llvm/docs/SourceLevelDebugging.rst index 03259645780..87076b09b60 100644 --- a/llvm/docs/SourceLevelDebugging.rst +++ b/llvm/docs/SourceLevelDebugging.rst @@ -670,6 +670,37 @@ a C/C++ front-end would generate the following descriptors: ... } +Fortran specific debug information +================================== + +Fortran function information +---------------------------- + +There are a few DWARF attributes defined to support client debugging of Fortran programs. LLVM can generate (or omit) the appropriate DWARF attributes for the prefix-specs of ELEMENTAL, PURE, IMPURE, RECURSIVE, and NON_RECURSIVE. This is done by using the spFlags values: DISPFlagElemental, DISPFlagPure, and DISPFlagRecursive. + +.. code-block:: fortran + + elemental function elem_func(a) + +a Fortran front-end would generate the following descriptors: + +.. code-block:: text + + !11 = distinct !DISubprogram(name: "subroutine2", scope: !1, file: !1, + line: 5, type: !8, scopeLine: 6, + spFlags: DISPFlagDefinition | DISPFlagElemental, unit: !0, + retainedNodes: !2) + +and this will materialize an additional DWARF attribute as: + +.. code-block:: text + + DW_TAG_subprogram [3] + DW_AT_low_pc [DW_FORM_addr] (0x0000000000000010 ".text") + DW_AT_high_pc [DW_FORM_data4] (0x00000001) + ... + DW_AT_elemental [DW_FORM_flag_present] (true) + Debugging information format ============================ |