[Lldb-commits] [lldb] a731c6b - [lldb/Initializers] Move all macOS initializers into PlatformMacOSX
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Tue Jan 21 09:41:01 PST 2020
Author: Jonas Devlieghere
Date: 2020-01-21T09:40:48-08:00
New Revision: a731c6ba94d0464c6a122de1af70ab88ffb5c1a6
URL: https://github.com/llvm/llvm-project/commit/a731c6ba94d0464c6a122de1af70ab88ffb5c1a6
DIFF: https://github.com/llvm/llvm-project/commit/a731c6ba94d0464c6a122de1af70ab88ffb5c1a6.diff
LOG: [lldb/Initializers] Move all macOS initializers into PlatformMacOSX
PlatformMacOSX is the main entry point to the plugin with the same name.
This is part of a greater refactoring to auto generate the initializers.
Differential revision: https://reviews.llvm.org/D73116
Added:
Modified:
lldb/source/API/SystemInitializerFull.cpp
lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
Removed:
################################################################################
diff --git a/lldb/source/API/SystemInitializerFull.cpp b/lldb/source/API/SystemInitializerFull.cpp
index 7e4398a042e2..80f92a8709d5 100644
--- a/lldb/source/API/SystemInitializerFull.cpp
+++ b/lldb/source/API/SystemInitializerFull.cpp
@@ -102,13 +102,6 @@
#if defined(__APPLE__)
#include "Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.h"
-#include "Plugins/Platform/MacOSX/PlatformAppleTVSimulator.h"
-#include "Plugins/Platform/MacOSX/PlatformAppleWatchSimulator.h"
-#include "Plugins/Platform/MacOSX/PlatformDarwinKernel.h"
-#include "Plugins/Platform/MacOSX/PlatformRemoteAppleBridge.h"
-#include "Plugins/Platform/MacOSX/PlatformRemoteAppleTV.h"
-#include "Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.h"
-#include "Plugins/Platform/MacOSX/PlatformiOSSimulator.h"
#include "Plugins/Process/MacOSX-Kernel/ProcessKDP.h"
#include "Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.h"
#endif
@@ -206,10 +199,6 @@ llvm::Error SystemInitializerFull::Initialize() {
platform_android::PlatformAndroid::Initialize();
PlatformRemoteiOS::Initialize();
PlatformMacOSX::Initialize();
-#if defined(__APPLE__)
- PlatformiOSSimulator::Initialize();
- PlatformDarwinKernel::Initialize();
-#endif
// Initialize LLVM and Clang
llvm::InitializeAllTargets();
@@ -273,11 +262,6 @@ llvm::Error SystemInitializerFull::Initialize() {
#if defined(__APPLE__)
SymbolVendorMacOSX::Initialize();
ProcessKDP::Initialize();
- PlatformAppleTVSimulator::Initialize();
- PlatformAppleWatchSimulator::Initialize();
- PlatformRemoteAppleTV::Initialize();
- PlatformRemoteAppleWatch::Initialize();
- PlatformRemoteAppleBridge::Initialize();
DynamicLoaderDarwinKernel::Initialize();
#endif
@@ -366,11 +350,6 @@ void SystemInitializerFull::Terminate() {
DynamicLoaderDarwinKernel::Terminate();
ProcessKDP::Terminate();
SymbolVendorMacOSX::Terminate();
- PlatformAppleTVSimulator::Terminate();
- PlatformAppleWatchSimulator::Terminate();
- PlatformRemoteAppleTV::Terminate();
- PlatformRemoteAppleWatch::Terminate();
- PlatformRemoteAppleBridge::Terminate();
#endif
#if defined(__FreeBSD__)
@@ -388,7 +367,6 @@ void SystemInitializerFull::Terminate() {
DynamicLoaderStatic::Terminate();
DynamicLoaderWindowsDYLD::Terminate();
-
platform_freebsd::PlatformFreeBSD::Terminate();
platform_linux::PlatformLinux::Terminate();
platform_netbsd::PlatformNetBSD::Terminate();
@@ -397,10 +375,6 @@ void SystemInitializerFull::Terminate() {
platform_android::PlatformAndroid::Terminate();
PlatformMacOSX::Terminate();
PlatformRemoteiOS::Terminate();
-#if defined(__APPLE__)
- PlatformiOSSimulator::Terminate();
- PlatformDarwinKernel::Terminate();
-#endif
breakpad::ObjectFileBreakpad::Terminate();
ObjectFileELF::Terminate();
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
index 134a4c7c8075..081fed2322db 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
@@ -7,16 +7,19 @@
//===----------------------------------------------------------------------===//
#include "PlatformMacOSX.h"
-#include "lldb/Host/Config.h"
-
-
-#include <sstream>
-
+#include "PlatformAppleTVSimulator.h"
+#include "PlatformAppleWatchSimulator.h"
+#include "PlatformDarwinKernel.h"
+#include "PlatformRemoteAppleBridge.h"
+#include "PlatformRemoteAppleTV.h"
+#include "PlatformRemoteAppleWatch.h"
+#include "PlatformiOSSimulator.h"
#include "lldb/Breakpoint/BreakpointLocation.h"
#include "lldb/Core/Module.h"
#include "lldb/Core/ModuleList.h"
#include "lldb/Core/ModuleSpec.h"
#include "lldb/Core/PluginManager.h"
+#include "lldb/Host/Config.h"
#include "lldb/Host/Host.h"
#include "lldb/Host/HostInfo.h"
#include "lldb/Symbol/ObjectFile.h"
@@ -28,6 +31,8 @@
#include "lldb/Utility/Status.h"
#include "lldb/Utility/StreamString.h"
+#include <sstream>
+
using namespace lldb;
using namespace lldb_private;
@@ -35,6 +40,13 @@ static uint32_t g_initialize_count = 0;
void PlatformMacOSX::Initialize() {
PlatformDarwin::Initialize();
+ PlatformiOSSimulator::Initialize();
+ PlatformDarwinKernel::Initialize();
+ PlatformAppleTVSimulator::Initialize();
+ PlatformAppleWatchSimulator::Initialize();
+ PlatformRemoteAppleTV::Initialize();
+ PlatformRemoteAppleWatch::Initialize();
+ PlatformRemoteAppleBridge::Initialize();
if (g_initialize_count++ == 0) {
#if defined(__APPLE__)
@@ -55,6 +67,13 @@ void PlatformMacOSX::Terminate() {
}
}
+ PlatformRemoteAppleBridge::Terminate();
+ PlatformRemoteAppleWatch::Terminate();
+ PlatformRemoteAppleTV::Terminate();
+ PlatformAppleWatchSimulator::Terminate();
+ PlatformAppleTVSimulator::Terminate();
+ PlatformDarwinKernel::Terminate();
+ PlatformiOSSimulator::Terminate();
PlatformDarwin::Terminate();
}
More information about the lldb-commits
mailing list