diff options
author | Enrico Granata <egranata@apple.com> | 2015-09-01 01:01:48 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2015-09-01 01:01:48 +0000 |
commit | 2233895a3b7fa414eb7a1e459ff1829170ea6b31 (patch) | |
tree | d4baaf4020acfb48e9a44f3a8b1ac7985c4c79a7 /lldb/source/Target/Language.cpp | |
parent | 989364c10153a3b60260abb131295ee571c49117 (diff) | |
download | bcm5719-llvm-2233895a3b7fa414eb7a1e459ff1829170ea6b31.tar.gz bcm5719-llvm-2233895a3b7fa414eb7a1e459ff1829170ea6b31.zip |
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
Diffstat (limited to 'lldb/source/Target/Language.cpp')
-rw-r--r-- | lldb/source/Target/Language.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lldb/source/Target/Language.cpp b/lldb/source/Target/Language.cpp index d1469073993..dd80f7c9200 100644 --- a/lldb/source/Target/Language.cpp +++ b/lldb/source/Target/Language.cpp @@ -87,6 +87,12 @@ Language::ForEach (std::function<bool(Language*)> callback) } } +lldb::TypeCategoryImplSP +Language::GetFormatters () +{ + return nullptr; +} + //---------------------------------------------------------------------- // Constructor //---------------------------------------------------------------------- |