Do not GC DW_AT_declaration
DW_TAG_subprogram
s
#9578
Merged
+102
−14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Declarations must be consistent across compilation units for any given type. This is the same situation as with, e. g., class member variables (fields).
Furthermore, even for ordinary C declarations, deleting them can theoretically mess up the expression evaluator (since a function that was supposed to be in scope no longer is). This is mostly a theoretical concern, however, as calling functions in the context of translated DWARF is currently deeply broken anyway.
Fixes #9512.
I've also tweaked the dumping of DIE offsets for easier cross-referencing with llvm-dwarfump.