[llvm-branch-commits] [lldb] 214948d - Revert "[Support] Move HTTP client/server to new LLVMSupportHTTP lib (NFC) (#…"
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Mar 9 01:18:59 PDT 2026
Author: Jan Patrick Lehr
Date: 2026-03-09T09:18:56+01:00
New Revision: 214948d904fbd95193510f7d1ae76b19d593e268
URL: https://github.com/llvm/llvm-project/commit/214948d904fbd95193510f7d1ae76b19d593e268
DIFF: https://github.com/llvm/llvm-project/commit/214948d904fbd95193510f7d1ae76b19d593e268.diff
LOG: Revert "[Support] Move HTTP client/server to new LLVMSupportHTTP lib (NFC) (#…"
This reverts commit 04dbbd414f542d02cb0eaee79fe8a4f2e32d18bf.
Added:
llvm/include/llvm/Debuginfod/HTTPClient.h
llvm/include/llvm/Debuginfod/HTTPServer.h
llvm/lib/Debuginfod/HTTPClient.cpp
llvm/lib/Debuginfod/HTTPServer.cpp
llvm/unittests/Debuginfod/HTTPServerTests.cpp
Modified:
lldb/source/Plugins/SymbolLocator/Debuginfod/SymbolLocatorDebuginfod.cpp
llvm/include/llvm/Debuginfod/Debuginfod.h
llvm/lib/Debuginfod/CMakeLists.txt
llvm/lib/Debuginfod/Debuginfod.cpp
llvm/lib/Support/CMakeLists.txt
llvm/tools/llvm-cov/CodeCoverage.cpp
llvm/tools/llvm-debuginfod-find/llvm-debuginfod-find.cpp
llvm/tools/llvm-debuginfod/llvm-debuginfod.cpp
llvm/tools/llvm-objdump/llvm-objdump.cpp
llvm/tools/llvm-profdata/llvm-profdata.cpp
llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp
llvm/unittests/Debuginfod/CMakeLists.txt
llvm/unittests/Debuginfod/DebuginfodTests.cpp
llvm/unittests/Support/CMakeLists.txt
Removed:
llvm/include/llvm/Support/HTTP/HTTPClient.h
llvm/include/llvm/Support/HTTP/HTTPServer.h
llvm/lib/Support/HTTP/CMakeLists.txt
llvm/lib/Support/HTTP/HTTPClient.cpp
llvm/lib/Support/HTTP/HTTPServer.cpp
llvm/unittests/Support/HTTP/CMakeLists.txt
llvm/unittests/Support/HTTP/HTTPServerTests.cpp
################################################################################
diff --git a/lldb/source/Plugins/SymbolLocator/Debuginfod/SymbolLocatorDebuginfod.cpp b/lldb/source/Plugins/SymbolLocator/Debuginfod/SymbolLocatorDebuginfod.cpp
index 14f5a6cbc8fa8..a09bb356e3a8c 100644
--- a/lldb/source/Plugins/SymbolLocator/Debuginfod/SymbolLocatorDebuginfod.cpp
+++ b/lldb/source/Plugins/SymbolLocator/Debuginfod/SymbolLocatorDebuginfod.cpp
@@ -15,7 +15,7 @@
#include "lldb/Utility/Log.h"
#include "llvm/Debuginfod/Debuginfod.h"
-#include "llvm/Support/HTTP/HTTPClient.h"
+#include "llvm/Debuginfod/HTTPClient.h"
using namespace lldb;
using namespace lldb_private;
diff --git a/llvm/include/llvm/Debuginfod/Debuginfod.h b/llvm/include/llvm/Debuginfod/Debuginfod.h
index 0bdb5d3ce3882..99fe15ad85979 100644
--- a/llvm/include/llvm/Debuginfod/Debuginfod.h
+++ b/llvm/include/llvm/Debuginfod/Debuginfod.h
@@ -20,11 +20,12 @@
#ifndef LLVM_DEBUGINFOD_DEBUGINFOD_H
#define LLVM_DEBUGINFOD_DEBUGINFOD_H
+#include "HTTPServer.h"
+
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Object/BuildID.h"
#include "llvm/Support/Error.h"
-#include "llvm/Support/HTTP/HTTPServer.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Mutex.h"
#include "llvm/Support/RWMutex.h"
diff --git a/llvm/include/llvm/Support/HTTP/HTTPClient.h b/llvm/include/llvm/Debuginfod/HTTPClient.h
similarity index 92%
rename from llvm/include/llvm/Support/HTTP/HTTPClient.h
rename to llvm/include/llvm/Debuginfod/HTTPClient.h
index aa4727ad33024..6ded55502f055 100644
--- a/llvm/include/llvm/Support/HTTP/HTTPClient.h
+++ b/llvm/include/llvm/Debuginfod/HTTPClient.h
@@ -1,4 +1,4 @@
-//===----------------------------------------------------------------------===//
+//===-- llvm/Support/HTTPClient.h - HTTP client library ---------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -12,8 +12,8 @@
///
//===----------------------------------------------------------------------===//
-#ifndef LLVM_SUPPORT_HTTP_HTTPCLIENT_H
-#define LLVM_SUPPORT_HTTP_HTTPCLIENT_H
+#ifndef LLVM_DEBUGINFOD_HTTPCLIENT_H
+#define LLVM_DEBUGINFOD_HTTPCLIENT_H
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
@@ -85,4 +85,4 @@ class HTTPClient {
} // end namespace llvm
-#endif // LLVM_SUPPORT_HTTP_HTTPCLIENT_H
+#endif // LLVM_DEBUGINFOD_HTTPCLIENT_H
diff --git a/llvm/include/llvm/Support/HTTP/HTTPServer.h b/llvm/include/llvm/Debuginfod/HTTPServer.h
similarity index 95%
rename from llvm/include/llvm/Support/HTTP/HTTPServer.h
rename to llvm/include/llvm/Debuginfod/HTTPServer.h
index 101ca0e6fbd6b..c200089200ab7 100644
--- a/llvm/include/llvm/Support/HTTP/HTTPServer.h
+++ b/llvm/include/llvm/Debuginfod/HTTPServer.h
@@ -1,4 +1,4 @@
-//===--- HTTPServer.h - HTTP server library ---------------------*- C++ -*-===//
+//===-- llvm/Debuginfod/HTTPServer.h - HTTP server library ------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -13,8 +13,8 @@
///
//===----------------------------------------------------------------------===//
-#ifndef LLVM_SUPPORT_HTTP_HTTPSERVER_H
-#define LLVM_SUPPORT_HTTP_HTTPSERVER_H
+#ifndef LLVM_DEBUGINFOD_HTTPSERVER_H
+#define LLVM_DEBUGINFOD_HTTPSERVER_H
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Error.h"
@@ -130,4 +130,4 @@ class HTTPServer {
};
} // end namespace llvm
-#endif // LLVM_SUPPORT_HTTP_HTTPSERVER_H
+#endif // LLVM_DEBUGINFOD_HTTPSERVER_H
diff --git a/llvm/lib/Debuginfod/CMakeLists.txt b/llvm/lib/Debuginfod/CMakeLists.txt
index c31481cc97f08..b1329bd2d077e 100644
--- a/llvm/lib/Debuginfod/CMakeLists.txt
+++ b/llvm/lib/Debuginfod/CMakeLists.txt
@@ -1,3 +1,13 @@
+# Link LibCURL if the user wants it
+if (LLVM_ENABLE_CURL)
+ set(imported_libs CURL::libcurl)
+endif()
+
+# Link cpp-httplib if the user wants it
+if (LLVM_ENABLE_HTTPLIB)
+ set(imported_libs ${imported_libs} httplib::httplib)
+endif()
+
# Make sure pthread is linked if this is a unix host
if (CMAKE_HOST_UNIX)
set(imported_libs ${imported_libs} ${LLVM_PTHREAD_LIB})
@@ -8,6 +18,8 @@ endif()
add_llvm_library(LLVMDebuginfod
BuildIDFetcher.cpp
Debuginfod.cpp
+ HTTPClient.cpp
+ HTTPServer.cpp
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/Debuginfod
@@ -17,7 +29,6 @@ add_llvm_library(LLVMDebuginfod
LINK_COMPONENTS
Support
- SupportHTTP
Symbolize
DebugInfoDWARF
BinaryFormat
diff --git a/llvm/lib/Debuginfod/Debuginfod.cpp b/llvm/lib/Debuginfod/Debuginfod.cpp
index 6847dc092dfdb..12f817c9e4bf0 100644
--- a/llvm/lib/Debuginfod/Debuginfod.cpp
+++ b/llvm/lib/Debuginfod/Debuginfod.cpp
@@ -27,6 +27,7 @@
#include "llvm/BinaryFormat/Magic.h"
#include "llvm/DebugInfo/DWARF/DWARFContext.h"
#include "llvm/DebugInfo/Symbolize/Symbolize.h"
+#include "llvm/Debuginfod/HTTPClient.h"
#include "llvm/Object/BuildID.h"
#include "llvm/Object/ELFObjectFile.h"
#include "llvm/Support/CachePruning.h"
@@ -34,7 +35,6 @@
#include "llvm/Support/Errc.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/FileUtilities.h"
-#include "llvm/Support/HTTP/HTTPClient.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/ThreadPool.h"
diff --git a/llvm/lib/Support/HTTP/HTTPClient.cpp b/llvm/lib/Debuginfod/HTTPClient.cpp
similarity index 95%
rename from llvm/lib/Support/HTTP/HTTPClient.cpp
rename to llvm/lib/Debuginfod/HTTPClient.cpp
index 6301f86da4086..4cca250746a59 100644
--- a/llvm/lib/Support/HTTP/HTTPClient.cpp
+++ b/llvm/lib/Debuginfod/HTTPClient.cpp
@@ -1,4 +1,4 @@
-//===--- HTTPClient.cpp - HTTP client library -----------------------------===//
+//===-- llvm/Debuginfod/HTTPClient.cpp - HTTP client library ----*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -12,13 +12,11 @@
///
//===----------------------------------------------------------------------===//
-#include "llvm/Support/HTTP/HTTPClient.h"
-
+#include "llvm/Debuginfod/HTTPClient.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/Error.h"
-#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/MemoryBuffer.h"
#ifdef LLVM_ENABLE_CURL
#include <curl/curl.h>
@@ -41,7 +39,7 @@ class HTTPClientCleanup {
public:
~HTTPClientCleanup() { HTTPClient::cleanup(); }
};
-ManagedStatic<HTTPClientCleanup> Cleanup;
+static const HTTPClientCleanup Cleanup;
#ifdef LLVM_ENABLE_CURL
diff --git a/llvm/lib/Support/HTTP/HTTPServer.cpp b/llvm/lib/Debuginfod/HTTPServer.cpp
similarity index 95%
rename from llvm/lib/Support/HTTP/HTTPServer.cpp
rename to llvm/lib/Debuginfod/HTTPServer.cpp
index c6fd49f7ee623..1264353ce4b33 100644
--- a/llvm/lib/Support/HTTP/HTTPServer.cpp
+++ b/llvm/lib/Debuginfod/HTTPServer.cpp
@@ -1,4 +1,4 @@
-//===--- HTTPServer.cpp - HTTP server library -----------------------------===//
+//===-- llvm/Debuginfod/HTTPServer.cpp - HTTP server library -----*- C++-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -13,8 +13,7 @@
///
//===----------------------------------------------------------------------===//
-#include "llvm/Support/HTTP/HTTPServer.h"
-
+#include "llvm/Debuginfod/HTTPServer.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Errc.h"
@@ -188,8 +187,12 @@ Expected<unsigned> HTTPServer::bind(const char *HostInterface) {
return make_error<HTTPServerError>("no httplib");
}
-Error HTTPServer::listen() { return make_error<HTTPServerError>("no httplib"); }
+Error HTTPServer::listen() {
+ return make_error<HTTPServerError>("no httplib");
+}
-void HTTPServer::stop() { llvm_unreachable("no httplib"); }
+void HTTPServer::stop() {
+ llvm_unreachable("no httplib");
+}
#endif // LLVM_ENABLE_HTTPLIB
diff --git a/llvm/lib/Support/CMakeLists.txt b/llvm/lib/Support/CMakeLists.txt
index 380be042df69d..b4e39fced3853 100644
--- a/llvm/lib/Support/CMakeLists.txt
+++ b/llvm/lib/Support/CMakeLists.txt
@@ -135,7 +135,6 @@ if (UNIX AND "${CMAKE_SYSTEM_NAME}" MATCHES "AIX")
endif()
add_subdirectory(BLAKE3)
-add_subdirectory(HTTP)
add_llvm_component_library(LLVMSupport
ABIBreak.cpp
diff --git a/llvm/lib/Support/HTTP/CMakeLists.txt b/llvm/lib/Support/HTTP/CMakeLists.txt
deleted file mode 100644
index 996da4f52cb04..0000000000000
--- a/llvm/lib/Support/HTTP/CMakeLists.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-# Link LibCURL if the user wants it
-if (LLVM_ENABLE_CURL)
- set(imported_libs CURL::libcurl)
-endif()
-
-# Link cpp-httplib if the user wants it
-if (LLVM_ENABLE_HTTPLIB)
- set(imported_libs ${imported_libs} httplib::httplib)
-endif()
-
-add_llvm_library(LLVMSupportHTTP
- HTTPClient.cpp
- HTTPServer.cpp
-
- LINK_LIBS
- ${imported_libs}
-
- LINK_COMPONENTS
- Support
-)
diff --git a/llvm/tools/llvm-cov/CodeCoverage.cpp b/llvm/tools/llvm-cov/CodeCoverage.cpp
index 0a01ef36728d1..0066d10156499 100644
--- a/llvm/tools/llvm-cov/CodeCoverage.cpp
+++ b/llvm/tools/llvm-cov/CodeCoverage.cpp
@@ -24,13 +24,13 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/Debuginfod/BuildIDFetcher.h"
#include "llvm/Debuginfod/Debuginfod.h"
+#include "llvm/Debuginfod/HTTPClient.h"
#include "llvm/Object/BuildID.h"
#include "llvm/ProfileData/Coverage/CoverageMapping.h"
#include "llvm/ProfileData/InstrProfReader.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Format.h"
-#include "llvm/Support/HTTP/HTTPClient.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/Process.h"
diff --git a/llvm/tools/llvm-debuginfod-find/llvm-debuginfod-find.cpp b/llvm/tools/llvm-debuginfod-find/llvm-debuginfod-find.cpp
index 8f1b9d0f4659d..934833bf6fe42 100644
--- a/llvm/tools/llvm-debuginfod-find/llvm-debuginfod-find.cpp
+++ b/llvm/tools/llvm-debuginfod-find/llvm-debuginfod-find.cpp
@@ -19,10 +19,10 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/Debuginfod/BuildIDFetcher.h"
#include "llvm/Debuginfod/Debuginfod.h"
+#include "llvm/Debuginfod/HTTPClient.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Option/Option.h"
#include "llvm/Support/CommandLine.h"
-#include "llvm/Support/HTTP/HTTPClient.h"
#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/LLVMDriver.h"
diff --git a/llvm/tools/llvm-debuginfod/llvm-debuginfod.cpp b/llvm/tools/llvm-debuginfod/llvm-debuginfod.cpp
index 16d95532a9edc..7b85166c1b4ae 100644
--- a/llvm/tools/llvm-debuginfod/llvm-debuginfod.cpp
+++ b/llvm/tools/llvm-debuginfod/llvm-debuginfod.cpp
@@ -18,10 +18,10 @@
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Debuginfod/Debuginfod.h"
+#include "llvm/Debuginfod/HTTPClient.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Option/Option.h"
#include "llvm/Support/CommandLine.h"
-#include "llvm/Support/HTTP/HTTPClient.h"
#include "llvm/Support/LLVMDriver.h"
#include "llvm/Support/ThreadPool.h"
diff --git a/llvm/tools/llvm-objdump/llvm-objdump.cpp b/llvm/tools/llvm-objdump/llvm-objdump.cpp
index 8a6403c578faf..a01b44a06b859 100644
--- a/llvm/tools/llvm-objdump/llvm-objdump.cpp
+++ b/llvm/tools/llvm-objdump/llvm-objdump.cpp
@@ -34,6 +34,7 @@
#include "llvm/DebugInfo/Symbolize/Symbolize.h"
#include "llvm/Debuginfod/BuildIDFetcher.h"
#include "llvm/Debuginfod/Debuginfod.h"
+#include "llvm/Debuginfod/HTTPClient.h"
#include "llvm/Demangle/Demangle.h"
#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCContext.h"
@@ -65,7 +66,6 @@
#include "llvm/Support/Errc.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Format.h"
-#include "llvm/Support/HTTP/HTTPClient.h"
#include "llvm/Support/LLVMDriver.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/SourceMgr.h"
diff --git a/llvm/tools/llvm-profdata/llvm-profdata.cpp b/llvm/tools/llvm-profdata/llvm-profdata.cpp
index ab67d75770fee..74c4732ca129a 100644
--- a/llvm/tools/llvm-profdata/llvm-profdata.cpp
+++ b/llvm/tools/llvm-profdata/llvm-profdata.cpp
@@ -14,6 +14,7 @@
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
+#include "llvm/Debuginfod/HTTPClient.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/Object/Binary.h"
#include "llvm/ProfileData/DataAccessProf.h"
@@ -34,7 +35,6 @@
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/FormattedStream.h"
-#include "llvm/Support/HTTP/HTTPClient.h"
#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/MD5.h"
#include "llvm/Support/MemoryBuffer.h"
diff --git a/llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp b/llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp
index 7f7f17ef94750..4784dafeb2948 100644
--- a/llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp
+++ b/llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp
@@ -25,6 +25,7 @@
#include "llvm/DebugInfo/Symbolize/Symbolize.h"
#include "llvm/Debuginfod/BuildIDFetcher.h"
#include "llvm/Debuginfod/Debuginfod.h"
+#include "llvm/Debuginfod/HTTPClient.h"
#include "llvm/Option/Arg.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Option/Option.h"
@@ -33,7 +34,6 @@
#include "llvm/Support/Debug.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/FileSystem.h"
-#include "llvm/Support/HTTP/HTTPClient.h"
#include "llvm/Support/LLVMDriver.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/StringSaver.h"
diff --git a/llvm/unittests/Debuginfod/CMakeLists.txt b/llvm/unittests/Debuginfod/CMakeLists.txt
index 4ac75c0720e89..9b084ff33f3b7 100644
--- a/llvm/unittests/Debuginfod/CMakeLists.txt
+++ b/llvm/unittests/Debuginfod/CMakeLists.txt
@@ -1,9 +1,9 @@
add_llvm_unittest(DebuginfodTests
+ HTTPServerTests.cpp
DebuginfodTests.cpp
)
target_link_libraries(DebuginfodTests PRIVATE
LLVMDebuginfod
- LLVMSupportHTTP
LLVMTestingSupport
)
diff --git a/llvm/unittests/Debuginfod/DebuginfodTests.cpp b/llvm/unittests/Debuginfod/DebuginfodTests.cpp
index 2e39484e7559f..5312912599e93 100644
--- a/llvm/unittests/Debuginfod/DebuginfodTests.cpp
+++ b/llvm/unittests/Debuginfod/DebuginfodTests.cpp
@@ -1,4 +1,4 @@
-//===--- DebuginfodTests.cpp - unit tests ---------------------------------===//
+//===-- llvm/unittest/Support/DebuginfodTests.cpp - unit tests ------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,8 +7,8 @@
//===----------------------------------------------------------------------===//
#include "llvm/Debuginfod/Debuginfod.h"
+#include "llvm/Debuginfod/HTTPClient.h"
#include "llvm/Support/FileSystem.h"
-#include "llvm/Support/HTTP/HTTPClient.h"
#include "llvm/Support/Path.h"
#include "llvm/Testing/Support/Error.h"
#include "gtest/gtest.h"
diff --git a/llvm/unittests/Support/HTTP/HTTPServerTests.cpp b/llvm/unittests/Debuginfod/HTTPServerTests.cpp
similarity index 94%
rename from llvm/unittests/Support/HTTP/HTTPServerTests.cpp
rename to llvm/unittests/Debuginfod/HTTPServerTests.cpp
index 1066fdd2f7735..cd1d5f2d9fc70 100644
--- a/llvm/unittests/Support/HTTP/HTTPServerTests.cpp
+++ b/llvm/unittests/Debuginfod/HTTPServerTests.cpp
@@ -1,4 +1,4 @@
-//===-- HTTPServerTests.cpp - unit tests ----------------------------------===//
+//===-- llvm/unittest/Support/HTTPServer.cpp - unit tests -------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -7,9 +7,9 @@
//===----------------------------------------------------------------------===//
#include "llvm/ADT/StringExtras.h"
+#include "llvm/Debuginfod/HTTPClient.h"
+#include "llvm/Debuginfod/HTTPServer.h"
#include "llvm/Support/Error.h"
-#include "llvm/Support/HTTP/HTTPClient.h"
-#include "llvm/Support/HTTP/HTTPServer.h"
#include "llvm/Support/ThreadPool.h"
#include "llvm/Testing/Support/Error.h"
#include "gmock/gmock.h"
@@ -237,15 +237,15 @@ TEST_F(HTTPClientServerTest, ClientTimeout) {
TEST_F(HTTPClientServerTest, PathMatching) {
HTTPServer Server;
- EXPECT_THAT_ERROR(Server.get(R"(/abc/(.*)/(.*))",
- [&](HTTPServerRequest &Request) {
- EXPECT_EQ(Request.UrlPath, "/abc/1/2");
- ASSERT_THAT(Request.UrlPathMatches,
- testing::ElementsAre("1", "2"));
- Request.setResponse(
- {200u, "text/plain", Request.UrlPath});
- }),
- Succeeded());
+ EXPECT_THAT_ERROR(
+ Server.get(R"(/abc/(.*)/(.*))",
+ [&](HTTPServerRequest &Request) {
+ EXPECT_EQ(Request.UrlPath, "/abc/1/2");
+ ASSERT_THAT(Request.UrlPathMatches,
+ testing::ElementsAre("1", "2"));
+ Request.setResponse({200u, "text/plain", Request.UrlPath});
+ }),
+ Succeeded());
EXPECT_THAT_ERROR(Server.get(UrlPathPattern,
[&](HTTPServerRequest &Request) {
llvm_unreachable(
diff --git a/llvm/unittests/Support/CMakeLists.txt b/llvm/unittests/Support/CMakeLists.txt
index a291f17331ff3..a8bf96bbe096f 100644
--- a/llvm/unittests/Support/CMakeLists.txt
+++ b/llvm/unittests/Support/CMakeLists.txt
@@ -128,7 +128,6 @@ add_llvm_unittest(SupportTests
intrinsics_gen
)
-add_subdirectory(HTTP)
add_subdirectory(LSP)
target_link_libraries(SupportTests PRIVATE LLVMTestingSupport)
diff --git a/llvm/unittests/Support/HTTP/CMakeLists.txt b/llvm/unittests/Support/HTTP/CMakeLists.txt
deleted file mode 100644
index 59e2393bfae06..0000000000000
--- a/llvm/unittests/Support/HTTP/CMakeLists.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-add_llvm_unittest(SupportHTTPTests
- HTTPServerTests.cpp
- )
-
-target_link_libraries(SupportHTTPTests PRIVATE
- LLVMSupportHTTP
- LLVMTestingSupport
- )
More information about the llvm-branch-commits
mailing list