[llvm] [BOLT][DWARF] Skip processing DWARF CUs with a DWO ID but no DWO name. (PR #154749)

Jinjie Huang via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 11 20:55:52 PDT 2025


================
@@ -583,6 +583,15 @@ DWARFDie DIEBuilder::resolveDIEReference(
   uint64_t TmpRefOffset = RefOffset;
   if ((RefCU =
            getUnitForOffset(*this, *DwarfContext, TmpRefOffset, AttrSpec))) {
+    std::optional<uint64_t> DWOId = RefCU->getDWOId();
----------------
Jinjie-Huang wrote:

Yes, I've tried that. So, it seems a better way is to add a return value for registerUnit to inform the caller that the CU wasn't actually registered. This prevents subsequent access to that CU, which would cause a crash.

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


More information about the llvm-commits mailing list