Skip to content

Commit 79d25ff

Browse files
authored
Fix debuginfod build failure when httplib is used. (llvm#156107)
This is a follow up of adbd432. 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.
1 parent fda67dc commit 79d25ff

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

llvm/include/llvm/Debuginfod/HTTPServer.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ class HTTPServer {
104104
public:
105105
HTTPServer();
106106
~HTTPServer();
107+
HTTPServer(HTTPServer &&);
107108

108109
/// Returns true only if LLVM has been compiled with a working HTTPServer.
109110
static bool isAvailable();

llvm/lib/Debuginfod/HTTPServer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ bool llvm::streamFile(HTTPServerRequest &Request, StringRef FilePath) {
6262
return true;
6363
}
6464

65+
HTTPServer::HTTPServer(HTTPServer &&) = default;
66+
6567
#ifdef LLVM_ENABLE_HTTPLIB
6668

6769
bool HTTPServer::isAvailable() { return true; }

0 commit comments

Comments
 (0)