Skip to content

Commit 2ed32b9

Browse files
committed
[dsymutil] Add DW_TAG_common_block to dieNeedsChildrenToBeMeaningful
Ensure we walk the children of common blocks when deciding what DIEs to keep. Otherwise we might incorrectly discard them leading to missing variables in the linked debug info. This also sorts the list of DW_TAGs alphabetically. (cherry picked from commit 96bbf47)
1 parent 8bb523c commit 2ed32b9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

llvm/tools/dsymutil/DwarfLinker.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -359,11 +359,12 @@ static bool dieNeedsChildrenToBeMeaningful(uint32_t Tag) {
359359
switch (Tag) {
360360
default:
361361
return false;
362-
case dwarf::DW_TAG_subprogram:
362+
case dwarf::DW_TAG_class_type:
363+
case dwarf::DW_TAG_common_block:
363364
case dwarf::DW_TAG_lexical_block:
364-
case dwarf::DW_TAG_subroutine_type:
365365
case dwarf::DW_TAG_structure_type:
366-
case dwarf::DW_TAG_class_type:
366+
case dwarf::DW_TAG_subprogram:
367+
case dwarf::DW_TAG_subroutine_type:
367368
case dwarf::DW_TAG_union_type:
368369
return true;
369370
}

0 commit comments

Comments
 (0)