[Lldb-commits] [PATCH] D18188: Move OperatingSystem plugins to SystemInitializerFull

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 15 08:44:13 PDT 2016


labath created this revision.
labath added a reviewer: zturner.
labath added a subscriber: lldb-commits.

These are not needed in lldb-server. Removing them shrinks the server size by about 1.5%.

http://reviews.llvm.org/D18188

Files:
  source/API/SystemInitializerFull.cpp
  source/Initialization/SystemInitializerCommon.cpp

Index: source/Initialization/SystemInitializerCommon.cpp
===================================================================
--- source/Initialization/SystemInitializerCommon.cpp
+++ source/Initialization/SystemInitializerCommon.cpp
@@ -25,8 +25,6 @@
 #include "Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.h"
 #include "Plugins/ObjectFile/ELF/ObjectFileELF.h"
 #include "Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h"
-#include "Plugins/OperatingSystem/Python/OperatingSystemPython.h"
-#include "Plugins/OperatingSystem/Go/OperatingSystemGo.h"
 #include "Plugins/Platform/Android/PlatformAndroid.h"
 #include "Plugins/Platform/FreeBSD/PlatformFreeBSD.h"
 #include "Plugins/Platform/Kalimba/PlatformKalimba.h"
@@ -145,10 +143,6 @@
 #if defined(_MSC_VER)
     ProcessWindowsLog::Initialize();
 #endif
-#ifndef LLDB_DISABLE_PYTHON
-    OperatingSystemPython::Initialize();
-#endif
-    OperatingSystemGo::Initialize();
 }
 
 void
@@ -189,11 +183,6 @@
     ProcessWindowsLog::Terminate();
 #endif
 
-#ifndef LLDB_DISABLE_PYTHON
-    OperatingSystemPython::Terminate();
-#endif
-    OperatingSystemGo::Terminate();
-
     HostInfo::Terminate();
     Log::Terminate();
 }
Index: source/API/SystemInitializerFull.cpp
===================================================================
--- source/API/SystemInitializerFull.cpp
+++ source/API/SystemInitializerFull.cpp
@@ -57,6 +57,8 @@
 #include "Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h"
 #include "Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h"
 #include "Plugins/MemoryHistory/asan/MemoryHistoryASan.h"
+#include "Plugins/OperatingSystem/Python/OperatingSystemPython.h"
+#include "Plugins/OperatingSystem/Go/OperatingSystemGo.h"
 #include "Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h"
 #include "Plugins/Process/elf-core/ProcessElfCore.h"
 #include "Plugins/Process/gdb-remote/ProcessGDBRemote.h"
@@ -259,6 +261,11 @@
     SystemInitializerCommon::Initialize();
     ScriptInterpreterNone::Initialize();
 
+#ifndef LLDB_DISABLE_PYTHON
+    OperatingSystemPython::Initialize();
+#endif
+    OperatingSystemGo::Initialize();
+
 #if !defined(LLDB_DISABLE_PYTHON)
     InitializeSWIG();
 
@@ -462,6 +469,11 @@
     process_gdb_remote::ProcessGDBRemote::Terminate();
     DynamicLoaderStatic::Terminate();
 
+#ifndef LLDB_DISABLE_PYTHON
+    OperatingSystemPython::Terminate();
+#endif
+    OperatingSystemGo::Terminate();
+
     // Now shutdown the common parts, in reverse order.
     SystemInitializerCommon::Terminate();
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18188.50740.patch
Type: text/x-patch
Size: 2563 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160315/2c89d661/attachment.bin>


More information about the lldb-commits mailing list