[llvm] 24e4164 - [DWARFLinker] Erase the type ref patch list with the section data (#217989)

via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 21 13:57:21 PDT 2026


Author: Jonas Devlieghere
Date: 2026-08-21T13:57:16-07:00
New Revision: 24e41647ccb1f0260e611445982105c8f8ce2f14

URL: https://github.com/llvm/llvm-project/commit/24e41647ccb1f0260e611445982105c8f8ce2f14
DIFF: https://github.com/llvm/llvm-project/commit/24e41647ccb1f0260e611445982105c8f8ce2f14.diff

LOG: [DWARFLinker] Erase the type ref patch list with the section data (#217989)

SectionDescriptor::clearAllSectionData drops every patch list but
ListDebugDieTypeRefPatch. maybeResetToLoadedStage calls eraseSections()
on a unit which is already past Stage::Cloned, so that list outlives the
section content it points into and is then applied to the offsets of the
re-cloned content.

Added: 
    

Modified: 
    llvm/lib/DWARFLinker/Parallel/OutputSections.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/DWARFLinker/Parallel/OutputSections.cpp b/llvm/lib/DWARFLinker/Parallel/OutputSections.cpp
index 079be51ace24a..7d9a47a48b663 100644
--- a/llvm/lib/DWARFLinker/Parallel/OutputSections.cpp
+++ b/llvm/lib/DWARFLinker/Parallel/OutputSections.cpp
@@ -66,6 +66,7 @@ void SectionDescriptor::clearAllSectionData() {
   ListDebugDieRefPatch.erase();
   ListDebugULEB128DieRefPatch.erase();
   ListDebugOffsetPatch.erase();
+  ListDebugDieTypeRefPatch.erase();
   ListDebugType2TypeDieRefPatch.erase();
   ListDebugTypeDeclFilePatch.erase();
   ListDebugTypeLineStrPatch.erase();


        


More information about the llvm-commits mailing list