mirror of
https://github.com/intel/llvm.git
synced 2026-01-23 07:58:23 +08:00
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:
@@ -87,6 +87,12 @@ Language::ForEach (std::function<bool(Language*)> callback)
|
||||
}
|
||||
}
|
||||
|
||||
lldb::TypeCategoryImplSP
|
||||
Language::GetFormatters ()
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Constructor
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user