[llvm] [Debuginfo] add debuginfod factory method (PR #154633)

Daniel Thornburgh via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 26 11:13:00 PDT 2025


================
@@ -605,7 +608,18 @@ DebuginfodServer::DebuginfodServer(DebuginfodLog &Log,
           return;
         }
         streamFile(Request, *PathOrErr);
-      }));
+      });
+  if (Err)
+    return std::move(Err);
+  return Error::success();
+}
+
+Expected<DebuginfodServer>
+DebuginfodServer::create(DebuginfodLog &Log, DebuginfodCollection &Collection) {
+  DebuginfodServer Serverd;
+  if (llvm::Error Err = Serverd.init(Log, Collection))
+    std::move(Err);
----------------
mysterymath wrote:

`return std::move(Err);`

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


More information about the llvm-commits mailing list