Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ed013cd

Browse files
committedJul 31, 2015
DI: Remove DW_TAG_arg_variable and DW_TAG_auto_variable
Remove the fake `DW_TAG_auto_variable` and `DW_TAG_arg_variable` tags, using `DW_TAG_variable` in their place Stop exposing the `tag:` field at all in the assembly format for `DILocalVariable`. Most of the testcase updates were generated by the following sed script: find test/ -name "*.ll" -o -name "*.mir" | xargs grep -l 'DILocalVariable' | xargs sed -i '' \ -e 's/tag: DW_TAG_arg_variable, //' \ -e 's/tag: DW_TAG_auto_variable, //' There were only a handful of tests in `test/Assembly` that I needed to update by hand. (Note: a follow-up could change `DILocalVariable::DILocalVariable()` to set the tag to `DW_TAG_formal_parameter` instead of `DW_TAG_variable` (as appropriate), instead of having that logic magically in the backend in `DbgVariable`. I've added a FIXME to that effect.) llvm-svn: 243774
1 parent 0aeed7c commit ed013cd

File tree

297 files changed

+1103
-1114
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

297 files changed

+1103
-1114
lines changed
 

‎llvm/docs/LangRef.rst

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3900,22 +3900,18 @@ mandatory, and points at an :ref:`DILexicalBlockFile`, an
39003900
DILocalVariable
39013901
"""""""""""""""
39023902

3903-
``DILocalVariable`` nodes represent local variables in the source language.
3904-
Instead of ``DW_TAG_variable``, they use LLVM-specific fake tags to
3905-
discriminate between local variables (``DW_TAG_auto_variable``) and subprogram
3906-
arguments (``DW_TAG_arg_variable``). In the latter case, the ``arg:`` field
3907-
specifies the argument position, and this variable will be included in the
3908-
``variables:`` field of its :ref:`DISubprogram`.
3909-
3910-
.. code-block:: llvm
3911-
3912-
!0 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "this", arg: 1,
3913-
scope: !3, file: !2, line: 7, type: !3,
3914-
flags: DIFlagArtificial)
3915-
!1 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "x", arg: 2,
3916-
scope: !4, file: !2, line: 7, type: !3)
3917-
!2 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "y",
3918-
scope: !5, file: !2, line: 7, type: !3)
3903+
``DILocalVariable`` nodes represent local variables in the source language. If
3904+
the ``arg:`` field is set to non-zero, then this variable is a subprogram
3905+
parameter, and it will be included in the ``variables:`` field of its
3906+
:ref:`DISubprogram`.
3907+
3908+
.. code-block:: llvm
3909+
3910+
!0 = !DILocalVariable(name: "this", arg: 1, scope: !3, file: !2, line: 7,
3911+
type: !3, flags: DIFlagArtificial)
3912+
!1 = !DILocalVariable(name: "x", arg: 2, scope: !4, file: !2, line: 7,
3913+
type: !3)
3914+
!2 = !DILocalVariable(name: "y", scope: !5, file: !2, line: 7, type: !3)
39193915
39203916
DIExpression
39213917
""""""""""""

‎llvm/docs/SourceLevelDebugging.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,13 +270,13 @@ Compiled to LLVM, this function would be represented like this:
270270
!8 = !{i32 2, !"Debug Info Version", i32 3}
271271
!9 = !{i32 1, !"PIC Level", i32 2}
272272
!10 = !{!"clang version 3.7.0 (trunk 231150) (llvm/trunk 231154)"}
273-
!11 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "X", scope: !4, file: !1, line: 2, type: !12)
273+
!11 = !DILocalVariable(name: "X", scope: !4, file: !1, line: 2, type: !12)
274274
!12 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
275275
!13 = !DIExpression()
276276
!14 = !DILocation(line: 2, column: 9, scope: !4)
277-
!15 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "Y", scope: !4, file: !1, line: 3, type: !12)
277+
!15 = !DILocalVariable(name: "Y", scope: !4, file: !1, line: 3, type: !12)
278278
!16 = !DILocation(line: 3, column: 9, scope: !4)
279-
!17 = !DILocalVariable(tag: DW_TAG_auto_variable, name: "Z", scope: !18, file: !1, line: 5, type: !12)
279+
!17 = !DILocalVariable(name: "Z", scope: !18, file: !1, line: 5, type: !12)
280280
!18 = distinct !DILexicalBlock(scope: !4, file: !1, line: 4, column: 5)
281281
!19 = !DILocation(line: 5, column: 11, scope: !18)
282282
!20 = !DILocation(line: 6, column: 11, scope: !18)

0 commit comments

Comments
 (0)
Please sign in to comment.