[Lldb-commits] [lldb] r359817 - Initialization: correct macro usage
Saleem Abdulrasool via lldb-commits
lldb-commits at lists.llvm.org
Thu May 2 12:25:18 PDT 2019
Author: compnerd
Date: Thu May 2 12:25:18 2019
New Revision: 359817
URL: http://llvm.org/viewvc/llvm-project?rev=359817&view=rev
Log:
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).
Modified:
lldb/trunk/source/Initialization/SystemInitializerCommon.cpp
Modified: lldb/trunk/source/Initialization/SystemInitializerCommon.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Initialization/SystemInitializerCommon.cpp?rev=359817&r1=359816&r2=359817&view=diff
==============================================================================
--- lldb/trunk/source/Initialization/SystemInitializerCommon.cpp (original)
+++ lldb/trunk/source/Initialization/SystemInitializerCommon.cpp Thu May 2 12:25:18 2019
@@ -24,7 +24,7 @@
#include "Plugins/Process/POSIX/ProcessPOSIXLog.h"
#endif
-#if defined(_MSC_VER)
+#if defined(_WIN32)
#include "Plugins/Process/Windows/Common/ProcessWindowsLog.h"
#include "lldb/Host/windows/windows.h"
#endif
@@ -41,7 +41,7 @@ SystemInitializerCommon::SystemInitializ
SystemInitializerCommon::~SystemInitializerCommon() {}
llvm::Error SystemInitializerCommon::Initialize() {
-#if defined(_MSC_VER)
+#if defined(_WIN32)
const char *disable_crash_dialog_var = getenv("LLDB_DISABLE_CRASH_DIALOG");
if (disable_crash_dialog_var &&
llvm::StringRef(disable_crash_dialog_var).equals_lower("true")) {
@@ -106,7 +106,7 @@ llvm::Error SystemInitializerCommon::Ini
#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__)
ProcessPOSIXLog::Initialize();
#endif
-#if defined(_MSC_VER)
+#if defined(_WIN32)
ProcessWindowsLog::Initialize();
#endif
@@ -121,7 +121,7 @@ void SystemInitializerCommon::Terminate(
EmulateInstructionMIPS::Terminate();
EmulateInstructionMIPS64::Terminate();
-#if defined(_MSC_VER)
+#if defined(_WIN32)
ProcessWindowsLog::Terminate();
#endif
More information about the lldb-commits
mailing list