mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-16 16:56:35 +00: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:
parent
2feee52457
commit
b884be8640
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user