[llvm] [llvm][SupportHTTP] Apply WinHTTP timeout setting after WinHttpOpen (PR #188969)
Daniel Thornburgh via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 8 13:58:15 PDT 2026
Stefan =?utf-8?q?Gränitz?= <stefan.graenitz at gmail.com>,
Stefan =?utf-8?q?Gränitz?= <stefan.graenitz at gmail.com>,
Stefan =?utf-8?q?Gränitz?= <stefan.graenitz at gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/188969 at github.com>
================
@@ -18,14 +18,22 @@
using namespace llvm;
-std::optional<std::string>
-DebuginfodFetcher::fetch(ArrayRef<uint8_t> BuildID) const {
+std::optional<std::string> DebuginfodFetcher::fetch(ArrayRef<uint8_t> BuildID,
+ std::string *ErrMsg) const {
if (std::optional<std::string> Path = BuildIDFetcher::fetch(BuildID))
return std::move(*Path);
Expected<std::string> PathOrErr = getCachedOrDownloadDebuginfo(BuildID);
if (PathOrErr)
return *PathOrErr;
- consumeError(PathOrErr.takeError());
+ if (ErrMsg)
+ *ErrMsg = toString(PathOrErr.takeError());
+ else
+ consumeError(PathOrErr.takeError());
----------------
mysterymath wrote:
This seems fine to me; but this should definitely be an optional nullptr param instead of two separate functions. I'd agree: most users of this functions will not care why this failed, and failure to fetch debuginfod is rarely an error; in most places it's one means to a different end.
Still, it seems like we should pass an actual Error object instead; is there a reason to stringify it eagerly?
https://github.com/llvm/llvm-project/pull/188969
More information about the llvm-commits
mailing list