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
This commit is contained in:
Enrico Granata
2015-09-01 01:01:48 +00:00
parent 989364c101
commit 2233895a3b
13 changed files with 394 additions and 37 deletions

View File

@@ -87,6 +87,12 @@ Language::ForEach (std::function<bool(Language*)> callback)
}
}
lldb::TypeCategoryImplSP
Language::GetFormatters ()
{
return nullptr;
}
//----------------------------------------------------------------------
// Constructor
//----------------------------------------------------------------------