[llvm] [BOLT] Fix updating DW_AT_stmt_list for DWARF5 TUs. (PR #79374)

Maksim Panchenko via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 24 15:16:08 PST 2024


================
@@ -1443,15 +1462,15 @@ void DWARFRewriter::updateLineTableOffsets(const MCAsmLayout &Layout) {
 CUOffsetMap DWARFRewriter::finalizeTypeSections(DIEBuilder &DIEBlder,
                                                 DIEStreamer &Streamer) {
   // update TypeUnit DW_AT_stmt_list with new .debug_line information.
-  for (const std::unique_ptr<DWARFUnit> &TU : BC.DwCtx->types_section_units()) {
-    DIE *UnitDIE = DIEBlder.getUnitDIEbyUnit(*TU.get());
+  auto updateLineTable = [&](DWARFUnit &Unit) -> void {
----------------
maksfb wrote:

`const DWARFUnit &`?

https://github.com/llvm/llvm-project/pull/79374


More information about the llvm-commits mailing list