[Lldb-commits] [lldb] b6c62ef - [lldb/Platform] Re-add ifdef's to guard macOS-only code.
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Tue Jan 21 12:27:03 PST 2020
Author: Jonas Devlieghere
Date: 2020-01-21T12:26:52-08:00
New Revision: b6c62ef0871576dd03de2c0077ba15ad0be23f6b
URL: https://github.com/llvm/llvm-project/commit/b6c62ef0871576dd03de2c0077ba15ad0be23f6b
DIFF: https://github.com/llvm/llvm-project/commit/b6c62ef0871576dd03de2c0077ba15ad0be23f6b.diff
LOG: [lldb/Platform] Re-add ifdef's to guard macOS-only code.
I moved the code from the system initializer to PlatformMacOSX. The
defines are still necessary because MacOSX is initialized on other
platforms where the other platforms are not available.
Added:
Modified:
lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
Removed:
################################################################################
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
index 081fed2322db..745918f255ab 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
#include "PlatformMacOSX.h"
+#if defined(__APPLE__)
#include "PlatformAppleTVSimulator.h"
#include "PlatformAppleWatchSimulator.h"
#include "PlatformDarwinKernel.h"
@@ -14,6 +15,7 @@
#include "PlatformRemoteAppleTV.h"
#include "PlatformRemoteAppleWatch.h"
#include "PlatformiOSSimulator.h"
+#endif
#include "lldb/Breakpoint/BreakpointLocation.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/ModuleList.h"
@@ -40,6 +42,7 @@ static uint32_t g_initialize_count = 0;
void PlatformMacOSX::Initialize() {
PlatformDarwin::Initialize();
+#if defined(__APPLE__)
PlatformiOSSimulator::Initialize();
PlatformDarwinKernel::Initialize();
PlatformAppleTVSimulator::Initialize();
@@ -47,6 +50,7 @@ void PlatformMacOSX::Initialize() {
PlatformRemoteAppleTV::Initialize();
PlatformRemoteAppleWatch::Initialize();
PlatformRemoteAppleBridge::Initialize();
+#endif
if (g_initialize_count++ == 0) {
#if defined(__APPLE__)
@@ -67,6 +71,7 @@ void PlatformMacOSX::Terminate() {
}
}
+#if defined(__APPLE__)
PlatformRemoteAppleBridge::Terminate();
PlatformRemoteAppleWatch::Terminate();
PlatformRemoteAppleTV::Terminate();
@@ -74,6 +79,7 @@ void PlatformMacOSX::Terminate() {
PlatformAppleTVSimulator::Terminate();
PlatformDarwinKernel::Terminate();
PlatformiOSSimulator::Terminate();
+#endif
PlatformDarwin::Terminate();
}
More information about the lldb-commits
mailing list