[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
Wed Apr 15 04:00:12 PDT 2026


================
@@ -18,14 +18,12 @@
 
 using namespace llvm;
 
-std::optional<std::string>
+Expected<std::string>
 DebuginfodFetcher::fetch(ArrayRef<uint8_t> BuildID) const {
-  if (std::optional<std::string> Path = BuildIDFetcher::fetch(BuildID))
+  if (Expected<std::string> Path = BuildIDFetcher::fetch(BuildID))
     return std::move(*Path);
+  else
+    consumeError(Path.takeError());
----------------
weliveindetail wrote:

Done. And added an assertion for the error code we expect to drop.

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


More information about the llvm-commits mailing list