Skip to content

Commit d179ce9

Browse files
committed
Initialization: correct macro usage
`_MSC_VER` indiciates that you are building with MSVC, not that you are building for Windows. Use `_WIN32` (which identifies Win32 and Win64). llvm-svn: 359817
1 parent 509c884 commit d179ce9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lldb/source/Initialization/SystemInitializerCommon.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include "Plugins/Process/POSIX/ProcessPOSIXLog.h"
2525
#endif
2626

27-
#if defined(_MSC_VER)
27+
#if defined(_WIN32)
2828
#include "Plugins/Process/Windows/Common/ProcessWindowsLog.h"
2929
#include "lldb/Host/windows/windows.h"
3030
#endif
@@ -41,7 +41,7 @@ SystemInitializerCommon::SystemInitializerCommon() {}
4141
SystemInitializerCommon::~SystemInitializerCommon() {}
4242

4343
llvm::Error SystemInitializerCommon::Initialize() {
44-
#if defined(_MSC_VER)
44+
#if defined(_WIN32)
4545
const char *disable_crash_dialog_var = getenv("LLDB_DISABLE_CRASH_DIALOG");
4646
if (disable_crash_dialog_var &&
4747
llvm::StringRef(disable_crash_dialog_var).equals_lower("true")) {
@@ -106,7 +106,7 @@ llvm::Error SystemInitializerCommon::Initialize() {
106106
#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)
107107
ProcessPOSIXLog::Initialize();
108108
#endif
109-
#if defined(_MSC_VER)
109+
#if defined(_WIN32)
110110
ProcessWindowsLog::Initialize();
111111
#endif
112112

@@ -121,7 +121,7 @@ void SystemInitializerCommon::Terminate() {
121121
EmulateInstructionMIPS::Terminate();
122122
EmulateInstructionMIPS64::Terminate();
123123

124-
#if defined(_MSC_VER)
124+
#if defined(_WIN32)
125125
ProcessWindowsLog::Terminate();
126126
#endif
127127

0 commit comments

Comments
 (0)