mirror of
https://github.com/intel/llvm.git
synced 2026-01-13 19:08:21 +08:00
[BOLT] Exit with error code on missing DWO CU (#125976)
If BOLT fails to locate DWO CU when using split DWARF, this signifies an issue with the input (missing .dwo) rather than an internal assertion.
This commit is contained in:
@@ -1759,7 +1759,11 @@ void BinaryContext::preprocessDebugInfo() {
|
||||
dwarf::toString(CU->getUnitDIE().find(dwarf::DW_AT_name), nullptr);
|
||||
if (std::optional<uint64_t> DWOID = CU->getDWOId()) {
|
||||
auto Iter = DWOCUs.find(*DWOID);
|
||||
assert(Iter != DWOCUs.end() && "DWO CU was not found.");
|
||||
if (Iter == DWOCUs.end()) {
|
||||
this->errs() << "BOLT-ERROR: DWO CU was not found for " << Name
|
||||
<< '\n';
|
||||
exit(1);
|
||||
}
|
||||
Name = dwarf::toString(
|
||||
Iter->second->getUnitDIE().find(dwarf::DW_AT_name), nullptr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user