mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +00:00
Use DILexicalBlockFile, rather than DILexicalBlock, to track discriminator changes to ensure discriminator changes don't introduce new DWARF DW_TAG_lexical_blocks.
Somewhat unnoticed in the original implementation of discriminators, but it could cause instructions to end up in new, small, DW_TAG_lexical_blocks due to the use of DILexicalBlock to track discriminator changes. Instead, use DILexicalBlockFile which we already use to track file changes without introducing new scopes, so it works well to track discriminator changes in the same way. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216239 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -320,7 +320,6 @@ Block descriptors
|
||||
metadata, ;; Reference to context descriptor
|
||||
i32, ;; Line number
|
||||
i32, ;; Column number
|
||||
i32, ;; DWARF path discriminator value
|
||||
i32 ;; Unique ID to identify blocks from a template function
|
||||
}
|
||||
|
||||
@@ -334,6 +333,7 @@ lexical blocks at same depth.
|
||||
i32, ;; Tag = 11 (DW_TAG_lexical_block)
|
||||
metadata, ;; Source directory (including trailing slash) & file pair
|
||||
metadata ;; Reference to the scope we're annotating with a file change
|
||||
i32, ;; DWARF path discriminator value
|
||||
}
|
||||
|
||||
This descriptor provides a wrapper around a lexical scope to handle file
|
||||
@@ -733,8 +733,7 @@ Compiled to LLVM, this function would be represented like this:
|
||||
!15 = metadata !{i32 786688, metadata !16, metadata !"Z", metadata !5, i32 5,
|
||||
metadata !11, i32 0, i32 0} ; [ DW_TAG_auto_variable ] [Z] \
|
||||
[line 5]
|
||||
!16 = metadata !{i32 786443, metadata !1, metadata !4, i32 4, i32 0, i32 0,
|
||||
i32 0} \
|
||||
!16 = metadata !{i32 786443, metadata !1, metadata !4, i32 4, i32 0, i32 0} \
|
||||
; [ DW_TAG_lexical_block ] [/private/tmp/t.c]
|
||||
!17 = metadata !{i32 5, i32 0, metadata !16, null}
|
||||
!18 = metadata !{i32 6, i32 0, metadata !16, null}
|
||||
@@ -786,8 +785,7 @@ scope information for the variable ``Z``.
|
||||
|
||||
.. code-block:: llvm
|
||||
|
||||
!16 = metadata !{i32 786443, metadata !1, metadata !4, i32 4, i32 0, i32 0,
|
||||
i32 0}
|
||||
!16 = metadata !{i32 786443, metadata !1, metadata !4, i32 4, i32 0, i32 0} \
|
||||
; [ DW_TAG_lexical_block ] [/private/tmp/t.c]
|
||||
!17 = metadata !{i32 5, i32 0, metadata !16, null}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user