[Lldb-commits] [PATCH] D20236: Remove ASTContexts from SystemInitializerCommon

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Fri May 13 06:24:45 PDT 2016


labath created this revision.
labath added reviewers: tberghammer, clayborg.
labath added a subscriber: lldb-commits.

The AST contexts are not needed in the server components, and the clang context in particular
pulls in large parts of clang into the binary. Simply removing these two calls reduces the
lldb-server size by about 50%--80%, depending on the architecture and build type.

This should not impact the client parts as the same calls are already present in
SystemInitializerFull.

http://reviews.llvm.org/D20236

Files:
  source/Initialization/SystemInitializerCommon.cpp

Index: source/Initialization/SystemInitializerCommon.cpp
===================================================================
--- source/Initialization/SystemInitializerCommon.cpp
+++ source/Initialization/SystemInitializerCommon.cpp
@@ -13,8 +13,6 @@
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Core/Log.h"
 #include "lldb/Core/Timer.h"
-#include "lldb/Symbol/GoASTContext.h"
-#include "lldb/Symbol/ClangASTContext.h"
 #include "Plugins/Instruction/ARM/EmulateInstructionARM.h"
 #include "Plugins/Instruction/MIPS/EmulateInstructionMIPS.h"
 #include "Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h"
@@ -98,9 +96,6 @@
     process_gdb_remote::ProcessGDBRemoteLog::Initialize();
 
     // Initialize plug-ins
-    ClangASTContext::Initialize();
-    GoASTContext::Initialize();
-
     ObjectContainerBSDArchive::Initialize();
     ObjectFileELF::Initialize();
     ObjectFilePECOFF::Initialize();
@@ -154,9 +149,6 @@
     PlatformMacOSX::Terminate();
     PlatformRemoteiOS::Terminate();
 
-    ClangASTContext::Terminate();
-    GoASTContext::Terminate();
-
     EmulateInstructionARM::Terminate();
     EmulateInstructionMIPS::Terminate();
     EmulateInstructionMIPS64::Terminate();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20236.57171.patch
Type: text/x-patch
Size: 1196 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160513/f17b5257/attachment-0001.bin>


More information about the lldb-commits mailing list