[llvm] 79d25ff - Fix debuginfod build failure when httplib is used. (#156107)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 29 15:25:27 PDT 2025
Author: Haowei
Date: 2025-08-29T15:25:24-07:00
New Revision: 79d25fffc7eb4af6c31cbd60e0e374723296d7a6
URL: https://github.com/llvm/llvm-project/commit/79d25fffc7eb4af6c31cbd60e0e374723296d7a6
DIFF: https://github.com/llvm/llvm-project/commit/79d25fffc7eb4af6c31cbd60e0e374723296d7a6.diff
LOG: Fix debuginfod build failure when httplib is used. (#156107)
This is a follow up of adbd43250ade1d5357542d8bd7c3dfed212ddec0. The
problem is, HTTPServer class will lost its implicit move ctor if httplib
is used. This patch adds the move ctor explicitly to solve this issue.
The default move ctor is not added in the header due to a limitation
that "httplib::Server" is a forward declaration and it is incomplete.
Added:
Modified:
llvm/include/llvm/Debuginfod/HTTPServer.h
llvm/lib/Debuginfod/HTTPServer.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/Debuginfod/HTTPServer.h b/llvm/include/llvm/Debuginfod/HTTPServer.h
index c200089200ab7..5c9c1082cbb95 100644
--- a/llvm/include/llvm/Debuginfod/HTTPServer.h
+++ b/llvm/include/llvm/Debuginfod/HTTPServer.h
@@ -104,6 +104,7 @@ class HTTPServer {
public:
HTTPServer();
~HTTPServer();
+ HTTPServer(HTTPServer &&);
/// Returns true only if LLVM has been compiled with a working HTTPServer.
static bool isAvailable();
diff --git a/llvm/lib/Debuginfod/HTTPServer.cpp b/llvm/lib/Debuginfod/HTTPServer.cpp
index 1264353ce4b33..b384fe812ac2c 100644
--- a/llvm/lib/Debuginfod/HTTPServer.cpp
+++ b/llvm/lib/Debuginfod/HTTPServer.cpp
@@ -62,6 +62,8 @@ bool llvm::streamFile(HTTPServerRequest &Request, StringRef FilePath) {
return true;
}
+HTTPServer::HTTPServer(HTTPServer &&) = default;
+
#ifdef LLVM_ENABLE_HTTPLIB
bool HTTPServer::isAvailable() { return true; }
More information about the llvm-commits
mailing list