[llvm] 3f2386d - [DebugInfo][docs] Document DILabel in LangRef
Scott Linder via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 13 11:27:16 PDT 2020
Author: Scott Linder
Date: 2020-10-13T18:26:41Z
New Revision: 3f2386de6325157324a0dc2ae00ef3db3a144563
URL: https://github.com/llvm/llvm-project/commit/3f2386de6325157324a0dc2ae00ef3db3a144563
DIFF: https://github.com/llvm/llvm-project/commit/3f2386de6325157324a0dc2ae00ef3db3a144563.diff
LOG: [DebugInfo][docs] Document DILabel in LangRef
Add some minimal documentation for DILabel, originally introduced in
D45024. Update the name and semantics of the `variables:` field in the
documentation for `DISubprogram`; the field is now called
`retainedNodes:` and is a heterogeneous list of `DILocalVariable` and
`DILabel`.
Reviewed By: aprantl
Differential Revision: https://reviews.llvm.org/D89082
Added:
Modified:
llvm/docs/LangRef.rst
Removed:
################################################################################
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index 1aa49732fd7c..d1bb34ef060c 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -5045,13 +5045,13 @@ a :ref:`compile unit <DICompileUnit>`.
DISubprogram
""""""""""""
-``DISubprogram`` nodes represent functions from the source language. A
-distinct ``DISubprogram`` may be attached to a function definition using
-``!dbg`` metadata. A unique ``DISubprogram`` may be attached to a function
-declaration used for call site debug info. The ``variables:`` field points at
-:ref:`variables <DILocalVariable>` that must be retained, even if their IR
-counterparts are optimized out of the IR. The ``type:`` field must point at an
-:ref:`DISubroutineType`.
+``DISubprogram`` nodes represent functions from the source language. A distinct
+``DISubprogram`` may be attached to a function definition using ``!dbg``
+metadata. A unique ``DISubprogram`` may be attached to a function declaration
+used for call site debug info. The ``retainedNodes:`` field is a list of
+:ref:`variables <DILocalVariable>` and :ref:`labels <DILabel>` that must be
+retained, even if their IR counterparts are optimized out of the IR. The
+``type:`` field must point at an :ref:`DISubroutineType`.
.. _DISubprogramDeclaration:
@@ -5074,7 +5074,8 @@ and ``scope:``.
virtuality: DW_VIRTUALITY_pure_virtual,
virtualIndex: 10, flags: DIFlagPrototyped,
isOptimized: true, unit: !5, templateParams: !6,
- declaration: !7, variables: !8, thrownTypes: !9)
+ declaration: !7, retainedNodes: !8,
+ thrownTypes: !9)
.. _DILexicalBlock:
@@ -5299,6 +5300,22 @@ appear in the included source file.
!2 = !DIMacroFile(macinfo: DW_MACINFO_start_file, line: 7, file: !2,
nodes: !3)
+.. _DILabel:
+
+DILabel
+"""""""
+
+``DILabel`` nodes represent labels within a :ref:`DISubprogram`. All fields of
+a ``DILabel`` are mandatory. The ``scope:`` field must be one of either a
+:ref:`DILexicalBlockFile`, a :ref:`DILexicalBlock`, or a :ref:`DISubprogram`.
+The ``name:`` field is the label identifier. The ``file:`` field is the
+:ref:`DIFile` the label is present in. The ``line:`` field is the source line
+within the file where the label is declared.
+
+.. code-block:: text
+
+ !2 = !DILabel(scope: !0, name: "foo", file: !1, line: 7)
+
'``tbaa``' Metadata
^^^^^^^^^^^^^^^^^^^
More information about the llvm-commits
mailing list