diff --git a/llvm/lib/DWARFLinker/DWARFLinker.cpp b/llvm/lib/DWARFLinker/DWARFLinker.cpp --- a/llvm/lib/DWARFLinker/DWARFLinker.cpp +++ b/llvm/lib/DWARFLinker/DWARFLinker.cpp @@ -1088,7 +1088,8 @@ if (AttrSpec.Attr == dwarf::DW_AT_low_pc) { if (Die.getTag() == dwarf::DW_TAG_inlined_subroutine || - Die.getTag() == dwarf::DW_TAG_lexical_block) + Die.getTag() == dwarf::DW_TAG_lexical_block || + Die.getTag() == dwarf::DW_TAG_label) { // The low_pc of a block or inline subroutine might get // relocated because it happens to match the low_pc of the // enclosing subprogram. To prevent issues with that, always use @@ -1097,7 +1098,7 @@ ? Info.OrigLowPc : Addr) + Info.PCOffset; - else if (Die.getTag() == dwarf::DW_TAG_compile_unit) { + } else if (Die.getTag() == dwarf::DW_TAG_compile_unit) { Addr = Unit.getLowPc(); if (Addr == std::numeric_limits::max()) return 0; diff --git a/llvm/test/tools/dsymutil/Inputs/private/tmp/label/label.o b/llvm/test/tools/dsymutil/Inputs/private/tmp/label/label.o new file mode 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 GIT binary patch literal 0 Hc$@