Author: Charles Zablit
Date: 2026-08-11T12:37:23+02:00
New Revision: c55ac2211d746c8bd5a6778866ab3fee033994c9

URL: 
https://github.com/llvm/llvm-project/commit/c55ac2211d746c8bd5a6778866ab3fee033994c9
DIFF: 
https://github.com/llvm/llvm-project/commit/c55ac2211d746c8bd5a6778866ab3fee033994c9.diff

LOG: [NFC][lldb][Windows] Move ConPTYUtils to Host/Windows (#215348)

ConPTYUtils is only used on Windows.

Added: 
    lldb/source/Host/windows/ConPTYUtils.cpp
    lldb/unittests/Host/windows/StripConPTYSequencesTest.cpp

Modified: 
    lldb/source/Host/CMakeLists.txt
    lldb/unittests/Host/CMakeLists.txt
    llvm/utils/gn/secondary/lldb/source/Host/BUILD.gn

Removed: 
    lldb/source/Host/common/ConPTYUtils.cpp
    lldb/unittests/Host/StripConPTYSequencesTest.cpp


################################################################################
diff  --git a/lldb/source/Host/CMakeLists.txt b/lldb/source/Host/CMakeLists.txt
index 57a833af97184..ebcad8f63e4f3 100644
--- a/lldb/source/Host/CMakeLists.txt
+++ b/lldb/source/Host/CMakeLists.txt
@@ -17,7 +17,6 @@ macro(add_host_subdirectory group)
 endmacro()
 
 add_host_subdirectory(common
-  common/ConPTYUtils.cpp
   common/DiagnosticsRendering.cpp
   common/DomainSocket.cpp
   common/FileAction.cpp
@@ -78,6 +77,7 @@ add_host_subdirectory(posix
 
 if (CMAKE_SYSTEM_NAME MATCHES "Windows")
   add_host_subdirectory(windows
+    windows/ConPTYUtils.cpp
     windows/ConnectionConPTYWindows.cpp
     windows/ConnectionGenericFileWindows.cpp
     windows/DomainSocketWindows.cpp

diff  --git a/lldb/source/Host/common/ConPTYUtils.cpp 
b/lldb/source/Host/windows/ConPTYUtils.cpp
similarity index 100%
rename from lldb/source/Host/common/ConPTYUtils.cpp
rename to lldb/source/Host/windows/ConPTYUtils.cpp

diff  --git a/lldb/unittests/Host/CMakeLists.txt 
b/lldb/unittests/Host/CMakeLists.txt
index 87a5ffcb6dbe1..6bbbd4461ff50 100644
--- a/lldb/unittests/Host/CMakeLists.txt
+++ b/lldb/unittests/Host/CMakeLists.txt
@@ -13,7 +13,6 @@ set (FILES
   ProcessRunLockTest.cpp
   SocketAddressTest.cpp
   SocketTest.cpp
-  StripConPTYSequencesTest.cpp
   ThreadLauncherTest.cpp
   XMLTest.cpp
 )
@@ -37,6 +36,12 @@ if (LLDB_ENABLE_TERMIOS)
   )
 endif()
 
+if (CMAKE_SYSTEM_NAME MATCHES "Windows")
+  list(APPEND FILES
+    windows/StripConPTYSequencesTest.cpp
+  )
+endif()
+
 add_lldb_unittest(HostTests
   ${FILES}
   PARTIAL_SOURCES_INTENDED

diff  --git a/lldb/unittests/Host/StripConPTYSequencesTest.cpp 
b/lldb/unittests/Host/windows/StripConPTYSequencesTest.cpp
similarity index 100%
rename from lldb/unittests/Host/StripConPTYSequencesTest.cpp
rename to lldb/unittests/Host/windows/StripConPTYSequencesTest.cpp

diff  --git a/llvm/utils/gn/secondary/lldb/source/Host/BUILD.gn 
b/llvm/utils/gn/secondary/lldb/source/Host/BUILD.gn
index 50e0837a3a4e9..4c0ea2ff7e9a5 100644
--- a/llvm/utils/gn/secondary/lldb/source/Host/BUILD.gn
+++ b/llvm/utils/gn/secondary/lldb/source/Host/BUILD.gn
@@ -16,7 +16,6 @@ static_library("Host") {
   ]
   public_deps = [ "//llvm/utils/gn/build/libs/xml" ]
   sources = [
-    "common/ConPTYUtils.cpp",
     "common/DiagnosticsRendering.cpp",
     "common/DomainSocket.cpp",
     "common/File.cpp",
@@ -69,6 +68,7 @@ static_library("Host") {
 
   if (current_os == "win") {
     sources += [
+      "windows/ConPTYUtils.cpp",
       "windows/ConnectionConPTYWindows.cpp",
       "windows/ConnectionGenericFileWindows.cpp",
       "windows/DomainSocketWindows.cpp",


        
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to