From 2233895a3b7fa414eb7a1e459ff1829170ea6b31 Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Tue, 1 Sep 2015 01:01:48 +0000 Subject: Add support for language plugins to provide data formatters Historically, data formatters all exist in a global repository (the category map) On top of that, some formatters can be "hardcoded" when the conditions under which they apply are not expressible as a typename (or typename regex) This change paves the way to move formatters into per-language buckets such that the C++ plugin is responsible for ownership of the C++ formatters, and so on The advantages of this are: a) language formatters only get created when they might apply b) formatters for a language are clearly owned by the matching language plugin The current model is one of static instantiation, that is a language knows the full set of formatters it vends and that is only asked-for once, and then handed off to the FormatManager In a future revision it might be interesting to add similar ability to the language runtimes, and monitor for certain shared library events to add even more library-specific formatters No formatters are moved as part of this change, so practically speaking this is NFC llvm-svn: 246515 --- lldb/source/API/SystemInitializerFull.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lldb/source/API') diff --git a/lldb/source/API/SystemInitializerFull.cpp b/lldb/source/API/SystemInitializerFull.cpp index 4ba4a420b2a..5711d0fc584 100644 --- a/lldb/source/API/SystemInitializerFull.cpp +++ b/lldb/source/API/SystemInitializerFull.cpp @@ -41,6 +41,9 @@ #include "Plugins/Instruction/ARM64/EmulateInstructionARM64.h" #include "Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.h" #include "Plugins/JITLoader/GDB/JITLoaderGDB.h" +#include "Plugins/Language/CPlusPlus/CPlusPlusLanguage.h" +#include "Plugins/Language/ObjC/ObjCLanguage.h" +#include "Plugins/Language/ObjCPlusPlus/ObjCPlusPlusLanguage.h" #include "Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h" #include "Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.h" #include "Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h" @@ -281,6 +284,10 @@ SystemInitializerFull::Initialize() AppleObjCRuntimeV1::Initialize(); SystemRuntimeMacOSX::Initialize(); RenderScriptRuntime::Initialize(); + + CPlusPlusLanguage::Initialize(); + ObjCLanguage::Initialize(); + ObjCPlusPlusLanguage::Initialize(); #if defined(_MSC_VER) ProcessWindows::Initialize(); @@ -385,6 +392,10 @@ SystemInitializerFull::Terminate() SystemRuntimeMacOSX::Terminate(); RenderScriptRuntime::Terminate(); + CPlusPlusLanguage::Terminate(); + ObjCLanguage::Terminate(); + ObjCPlusPlusLanguage::Terminate(); + #if defined(__APPLE__) ProcessMachCore::Terminate(); ProcessKDP::Terminate(); -- cgit v1.2.3