Skip to content

Commit 8851f2e

Browse files
committed
Do not generate information for DWO ID 0
1 parent cb9e307 commit 8851f2e

File tree

3 files changed

+977
-2
lines changed

3 files changed

+977
-2
lines changed

bolt/lib/Core/BinaryContext.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1628,12 +1628,15 @@ void BinaryContext::preprocessDWODebugInfo() {
16281628
for (const std::unique_ptr<DWARFUnit> &CU : DwCtx->compile_units()) {
16291629
DWARFUnit *const DwarfUnit = CU.get();
16301630
if (std::optional<uint64_t> DWOId = DwarfUnit->getDWOId()) {
1631-
if (*DWOId == 0)
1632-
continue;
16331631
std::string DWOName = dwarf::toString(
16341632
DwarfUnit->getUnitDIE().find(
16351633
{dwarf::DW_AT_dwo_name, dwarf::DW_AT_GNU_dwo_name}),
16361634
"");
1635+
if (*DWOId == 0) {
1636+
this->outs() << "BOLT-WARNING: Found DWO file of ID 0: '" << DWOName
1637+
<< "', it will not be processed.\n";
1638+
continue;
1639+
}
16371640
SmallString<16> AbsolutePath;
16381641
if (!opts::CompDirOverride.empty()) {
16391642
sys::path::append(AbsolutePath, opts::CompDirOverride);

0 commit comments

Comments
 (0)