[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
Mon Sep 15 05:38:08 PDT 2025
================
@@ -1008,12 +1009,15 @@ static uint64_t getHash(const DWARFUnit &DU) {
return DU.getOffset();
}
-void DIEBuilder::registerUnit(DWARFUnit &DU, bool NeedSort) {
+bool DIEBuilder::registerUnit(DWARFUnit &DU, bool NeedSort) {
+ if (DU.getDWOId() && !DU.isDWOUnit() &&
+ !DU.getUnitDIE().find({dwarf::DW_AT_dwo_name, dwarf::DW_AT_GNU_dwo_name}))
+ return false;
----------------
Jinjie-Huang wrote:
Added a isValidDwarfUnit() to identify whether CU is valid, and the warning was also moved into it.
https://github.com/llvm/llvm-project/pull/154749
More information about the llvm-commits
mailing list