Skip to content

Commit

Permalink
[BOLT][DWARF] Fix output ranges for deleted code (llvm#73464)
Browse files Browse the repository at this point in the history
Set range low_pc to 0 for DIEs that correspond to deleted code.

Fixes llvm#73428
  • Loading branch information
maksfb authored Nov 29, 2023
1 parent 35db35b commit 0acfe84
Show file tree
Hide file tree
Showing 3 changed files with 917 additions and 2 deletions.
3 changes: 1 addition & 2 deletions bolt/lib/Rewrite/DWARFRewriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -961,8 +961,7 @@ void DWARFRewriter::updateUnitDebugInfo(
std::move(OutputRanges), CachedRanges);
OutputRanges.clear();
} else if (OutputRanges.empty()) {
OutputRanges.push_back({RangesOrError.get().front().LowPC,
RangesOrError.get().front().HighPC});
OutputRanges.push_back({0, RangesOrError.get().front().HighPC});
}
} else if (!RangesOrError) {
consumeError(RangesOrError.takeError());
Expand Down
Loading

0 comments on commit 0acfe84

Please sign in to comment.