[llvm] [BOLT][DWARF] Skip processing DWO files with ID 0 (PR #154749)
Jinjie Huang via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 4 06:03:13 PDT 2025
Jinjie-Huang wrote:
> Before BOLT it has multiple DWO IDs that are the same, zero. Which should make llvm-dwp abort.
Yes, for a DW_TAG_skeleton_unit in llvm-dwp, having a DW_AT_dwo_name DIE will trigger a "duplicate DWO ID" error if duplicates exist. However, in the case I met(as shown above), this DIE does not have a DW_AT_dwo_name, and the actual dwo file doesn't exist either, since this DIE was generated for a .cpp file (which seems not a expected behavior, with DW_AT_name=xxx.cpp). In this situation, since there is no duplicate dwo file, the dwp error is not triggered.
Are you suggesting that we can determine whether to process this CU by checking for the existence of DW_AT_dwo_name in the DIE, instead of checking if the dwoid is 0?
> If we do want to support partial update maybe a better way is not to include those CUs in final output?
I might be mistaken, the current changes won’t generate DWOs for these CUs, and the CUs in these binaries should also be discarded, right?
https://github.com/llvm/llvm-project/pull/154749
More information about the llvm-commits
mailing list