diff options
-rw-r--r-- | lldb/include/lldb/Host/windows/PosixApi.h | 2 | ||||
-rw-r--r-- | lldb/source/Core/Debugger.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Core/Module.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Core/ModuleList.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Core/PluginManager.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Host/common/File.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Host/common/MainLoop.cpp | 8 | ||||
-rw-r--r-- | lldb/source/Host/common/Symbols.cpp | 4 | ||||
-rw-r--r-- | lldb/source/Host/common/TCPSocket.cpp | 4 | ||||
-rw-r--r-- | lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h | 2 | ||||
-rw-r--r-- | lldb/source/Utility/FileSpec.cpp | 3 | ||||
-rw-r--r-- | lldb/source/Utility/Log.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Utility/TildeExpressionResolver.cpp | 5 |
13 files changed, 19 insertions, 21 deletions
diff --git a/lldb/include/lldb/Host/windows/PosixApi.h b/lldb/include/lldb/Host/windows/PosixApi.h index de70266a5ef..801107dadce 100644 --- a/lldb/include/lldb/Host/windows/PosixApi.h +++ b/lldb/include/lldb/Host/windows/PosixApi.h @@ -11,7 +11,7 @@ #define liblldb_Host_windows_PosixApi_h #include "llvm/Support/Compiler.h" -#if !defined(LLVM_ON_WIN32) +#if !defined(_WIN32) #error "windows/PosixApi.h being #included on non Windows system!" #endif diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp index 172cd487bec..824b2afaa44 100644 --- a/lldb/source/Core/Debugger.cpp +++ b/lldb/source/Core/Debugger.cpp @@ -48,7 +48,7 @@ #include "lldb/Utility/StreamCallback.h" #include "lldb/Utility/StreamString.h" -#if defined(LLVM_ON_WIN32) +#if defined(_WIN32) #include "lldb/Host/windows/PosixApi.h" // for PATH_MAX #endif diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp index 39d7c6241bf..35be2949618 100644 --- a/lldb/source/Core/Module.cpp +++ b/lldb/source/Core/Module.cpp @@ -46,7 +46,7 @@ #include "lldb/Utility/StreamString.h" #include "lldb/Utility/Timer.h" -#if defined(LLVM_ON_WIN32) +#if defined(_WIN32) #include "lldb/Host/windows/PosixApi.h" // for PATH_MAX #endif diff --git a/lldb/source/Core/ModuleList.cpp b/lldb/source/Core/ModuleList.cpp index 4c99bbcbda7..6d7f450e984 100644 --- a/lldb/source/Core/ModuleList.cpp +++ b/lldb/source/Core/ModuleList.cpp @@ -26,7 +26,7 @@ #include "lldb/Utility/UUID.h" // for UUID, operator!=, operator== #include "lldb/lldb-defines.h" // for LLDB_INVALID_INDEX32 -#if defined(LLVM_ON_WIN32) +#if defined(_WIN32) #include "lldb/Host/windows/PosixApi.h" // for PATH_MAX #endif diff --git a/lldb/source/Core/PluginManager.cpp b/lldb/source/Core/PluginManager.cpp index a49fbc3f90f..1f02b401c7e 100644 --- a/lldb/source/Core/PluginManager.cpp +++ b/lldb/source/Core/PluginManager.cpp @@ -17,7 +17,7 @@ #include "lldb/Utility/Status.h" #include "lldb/Utility/StringList.h" // for StringList -#if defined(LLVM_ON_WIN32) +#if defined(_WIN32) #include "lldb/Host/windows/PosixApi.h" // for PATH_MAX #endif diff --git a/lldb/source/Host/common/File.cpp b/lldb/source/Host/common/File.cpp index 6ee4e894756..22b42c6f1c7 100644 --- a/lldb/source/Host/common/File.cpp +++ b/lldb/source/Host/common/File.cpp @@ -100,7 +100,7 @@ int File::GetDescriptor() const { // Don't open the file descriptor if we don't need to, just get it from the // stream if we have one. if (StreamIsValid()) { -#if defined(LLVM_ON_WIN32) +#if defined(_WIN32) return _fileno(m_stream); #else return fileno(m_stream); diff --git a/lldb/source/Host/common/MainLoop.cpp b/lldb/source/Host/common/MainLoop.cpp index 6cbb5a84256..2e101c061e8 100644 --- a/lldb/source/Host/common/MainLoop.cpp +++ b/lldb/source/Host/common/MainLoop.cpp @@ -26,7 +26,7 @@ #if HAVE_SYS_EVENT_H #include <sys/event.h> -#elif defined(LLVM_ON_WIN32) +#elif defined(_WIN32) #include <winsock2.h> #elif defined(__ANDROID__) #include <sys/syscall.h> @@ -34,14 +34,14 @@ #include <poll.h> #endif -#ifdef LLVM_ON_WIN32 +#ifdef _WIN32 #define POLL WSAPoll #else #define POLL poll #endif #if SIGNAL_POLLING_UNSUPPORTED -#ifdef LLVM_ON_WIN32 +#ifdef _WIN32 typedef int sigset_t; typedef int siginfo_t; #endif @@ -262,7 +262,7 @@ MainLoop::~MainLoop() { MainLoop::ReadHandleUP MainLoop::RegisterReadObject(const IOObjectSP &object_sp, const Callback &callback, Status &error) { -#ifdef LLVM_ON_WIN32 +#ifdef _WIN32 if (object_sp->GetFdType() != IOObject:: eFDTypeSocket) { error.SetErrorString("MainLoop: non-socket types unsupported on Windows"); return nullptr; diff --git a/lldb/source/Host/common/Symbols.cpp b/lldb/source/Host/common/Symbols.cpp index 0bbee7adf8e..4fce965f75e 100644 --- a/lldb/source/Host/common/Symbols.cpp +++ b/lldb/source/Host/common/Symbols.cpp @@ -233,7 +233,7 @@ FileSpec Symbols::LocateExecutableSymbolFile(const ModuleSpec &module_spec) { // Add current working directory. debug_file_search_paths.AppendIfUnique(FileSpec(".", true)); -#ifndef LLVM_ON_WIN32 +#ifndef _WIN32 #if defined(__NetBSD__) // Add /usr/libdata/debug directory. debug_file_search_paths.AppendIfUnique( @@ -242,7 +242,7 @@ FileSpec Symbols::LocateExecutableSymbolFile(const ModuleSpec &module_spec) { // Add /usr/lib/debug directory. debug_file_search_paths.AppendIfUnique(FileSpec("/usr/lib/debug", true)); #endif -#endif // LLVM_ON_WIN32 +#endif // _WIN32 std::string uuid_str; const UUID &module_uuid = module_spec.GetUUID(); diff --git a/lldb/source/Host/common/TCPSocket.cpp b/lldb/source/Host/common/TCPSocket.cpp index f896944bb1b..1a10336f1df 100644 --- a/lldb/source/Host/common/TCPSocket.cpp +++ b/lldb/source/Host/common/TCPSocket.cpp @@ -26,11 +26,11 @@ #include <sys/socket.h> #endif -#if defined(LLVM_ON_WIN32) +#if defined(_WIN32) #include <winsock2.h> #endif -#ifdef LLVM_ON_WIN32 +#ifdef _WIN32 #define CLOSE_SOCKET closesocket typedef const char *set_socket_option_arg_type; #else diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h b/lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h index ee13b7a5cd1..81bcb8aa73b 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h @@ -18,7 +18,7 @@ // Python is disabled in this build #else #include "llvm/Support/Compiler.h" -#if defined(LLVM_ON_WIN32) +#if defined(_WIN32) // If anyone #includes Host/PosixApi.h later, it will try to typedef pid_t. We // need to ensure this doesn't happen. At the same time, Python.h will also try // to redefine a bunch of stuff that PosixApi.h defines. So define it all now diff --git a/lldb/source/Utility/FileSpec.cpp b/lldb/source/Utility/FileSpec.cpp index 72f86917b81..2d8d73aa771 100644 --- a/lldb/source/Utility/FileSpec.cpp +++ b/lldb/source/Utility/FileSpec.cpp @@ -17,7 +17,6 @@ #include "llvm/ADT/StringRef.h" #include "llvm/ADT/Triple.h" // for Triple #include "llvm/ADT/Twine.h" // for Twine -#include "llvm/Config/llvm-config.h" // for LLVM_ON_WIN32 #include "llvm/Support/ErrorOr.h" // for ErrorOr #include "llvm/Support/FileSystem.h" #include "llvm/Support/Path.h" @@ -38,7 +37,7 @@ using namespace lldb_private; namespace { static constexpr FileSpec::PathSyntax GetNativeSyntax() { -#if defined(LLVM_ON_WIN32) +#if defined(_WIN32) return FileSpec::ePathSyntaxWindows; #else return FileSpec::ePathSyntaxPosix; diff --git a/lldb/source/Utility/Log.cpp b/lldb/source/Utility/Log.cpp index f247124f8d6..16396fb8b03 100644 --- a/lldb/source/Utility/Log.cpp +++ b/lldb/source/Utility/Log.cpp @@ -28,7 +28,7 @@ #include <utility> // for pair #include <assert.h> // for assert -#if defined(LLVM_ON_WIN32) +#if defined(_WIN32) #include <process.h> // for getpid #else #include <unistd.h> diff --git a/lldb/source/Utility/TildeExpressionResolver.cpp b/lldb/source/Utility/TildeExpressionResolver.cpp index 64a771118d6..ae947059d8b 100644 --- a/lldb/source/Utility/TildeExpressionResolver.cpp +++ b/lldb/source/Utility/TildeExpressionResolver.cpp @@ -14,12 +14,11 @@ #include "llvm/ADT/STLExtras.h" // for any_of #include "llvm/ADT/SmallVector.h" // for SmallVectorImpl -#include "llvm/Config/llvm-config.h" // for LLVM_ON_WIN32 #include "llvm/Support/FileSystem.h" #include "llvm/Support/Path.h" #include "llvm/Support/raw_ostream.h" // for fs -#if !defined(LLVM_ON_WIN32) +#if !defined(_WIN32) #include <pwd.h> #endif @@ -49,7 +48,7 @@ bool StandardTildeExpressionResolver::ResolvePartial(StringRef Expr, assert(Expr.empty() || Expr[0] == '~'); Output.clear(); -#if defined(LLVM_ON_WIN32) || defined(__ANDROID__) +#if defined(_WIN32) || defined(__ANDROID__) return false; #else if (Expr.empty()) |