[llvm] [llvm] Errorize DebuginfodFetcher::fetch() for inspection at call-sites (NFC) (PR #191191)

Stefan Gränitz via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 21 02:57:49 PDT 2026


================
@@ -490,14 +490,15 @@ bool LLVMSymbolizer::getOrFindDebugBinary(const ArrayRef<uint8_t> BuildID,
   }
   if (!BIDFetcher)
     return false;
-  if (std::optional<std::string> Path = BIDFetcher->fetch(BuildID)) {
+  Expected<std::string> Path = BIDFetcher->fetch(BuildID);
+  if (Path) {
     Result = *Path;
     auto InsertResult = BuildIDPaths.insert({BuildIDStr, Result});
     assert(InsertResult.second);
     (void)InsertResult;
     return true;
   }
-
+  consumeError(Path.takeError());
----------------
weliveindetail wrote:

Yes, I agree. Added comments in 047c18a87078674803a7559a1f7c66682b123363

https://github.com/llvm/llvm-project/pull/191191


More information about the llvm-commits mailing list