Author: Pavel Labath
Date: 2025-01-27T13:41:18+01:00
New Revision: 6087c3049656bbaef51fffb48e2404e86f7e0d3f

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

LOG: [lldb] Simplify preprocessor conditional (#124522)

The long list of defines is just a very elaborate way to say "not
windows".

Added: 
    

Modified: 
    lldb/source/Host/common/Host.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Host/common/Host.cpp 
b/lldb/source/Host/common/Host.cpp
index fdb623667bc251..d5054008268b9d 100644
--- a/lldb/source/Host/common/Host.cpp
+++ b/lldb/source/Host/common/Host.cpp
@@ -11,13 +11,19 @@
 #include <climits>
 #include <cstdlib>
 #include <sys/types.h>
+
 #ifndef _WIN32
 #include <dlfcn.h>
 #include <grp.h>
 #include <netdb.h>
 #include <pwd.h>
 #include <sys/stat.h>
+#include <sys/syscall.h>
+#include <sys/wait.h>
 #include <unistd.h>
+#if !defined(__ANDROID__)
+#include <spawn.h>
+#endif
 #endif
 
 #if defined(__APPLE__)
@@ -26,16 +32,6 @@
 #include <mach/mach_port.h>
 #endif
 
-#if defined(__linux__) || defined(__FreeBSD__) ||                              
\
-    defined(__FreeBSD_kernel__) || defined(__APPLE__) ||                       
\
-    defined(__NetBSD__) || defined(__OpenBSD__) || defined(__EMSCRIPTEN__)
-#if !defined(__ANDROID__)
-#include <spawn.h>
-#endif
-#include <sys/syscall.h>
-#include <sys/wait.h>
-#endif
-
 #if defined(__FreeBSD__)
 #include <pthread_np.h>
 #endif


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to