[llvm] [BOLT] Exit with error code on missing DWO CU (PR #125976)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 5 17:03:38 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-bolt
Author: Amir Ayupov (aaupov)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/125976.diff
1 Files Affected:
- (modified) bolt/lib/Core/BinaryContext.cpp (+4-1)
``````````diff
diff --git a/bolt/lib/Core/BinaryContext.cpp b/bolt/lib/Core/BinaryContext.cpp
index f5e11358daaa32b..3947c62ac8df00e 100644
--- a/bolt/lib/Core/BinaryContext.cpp
+++ b/bolt/lib/Core/BinaryContext.cpp
@@ -1759,7 +1759,10 @@ 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() << "DWO CU was not found for " << Name << '\n';
+ exit(1);
+ }
Name = dwarf::toString(
Iter->second->getUnitDIE().find(dwarf::DW_AT_name), nullptr);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/125976
More information about the llvm-commits
mailing list