diff options
author | Enrico Granata <egranata@apple.com> | 2014-12-10 02:00:45 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2014-12-10 02:00:45 +0000 |
commit | ff0f23dd417a79ae029206ff16a6d0c785b546cc (patch) | |
tree | 0590c2166f7f23877c04cb74cde80490fb2db5d5 /lldb/source/DataFormatters/FormatManager.cpp | |
parent | b9321bd77445fb09ca174203de282a1ff593ba5e (diff) | |
download | llvm-ff0f23dd417a79ae029206ff16a6d0c785b546cc.zip llvm-ff0f23dd417a79ae029206ff16a6d0c785b546cc.tar.gz llvm-ff0f23dd417a79ae029206ff16a6d0c785b546cc.tar.bz2 |
Remove the last vestige of the world before data formatters :-)
Function pointers had a summary generated for them bypassing formatters, directly as part of the ValueObject subsystem
This patch transitions that code into a hardcoded summary
llvm-svn: 223906
Diffstat (limited to 'lldb/source/DataFormatters/FormatManager.cpp')
-rw-r--r-- | lldb/source/DataFormatters/FormatManager.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lldb/source/DataFormatters/FormatManager.cpp b/lldb/source/DataFormatters/FormatManager.cpp index aac3932..01799ce 100644 --- a/lldb/source/DataFormatters/FormatManager.cpp +++ b/lldb/source/DataFormatters/FormatManager.cpp @@ -1568,6 +1568,17 @@ FormatManager::LoadHardcodedFormatters() } { // insert code to load summaries here + m_hardcoded_summaries.push_back( + [](lldb_private::ValueObject& valobj, + lldb::DynamicValueType, + FormatManager&) -> TypeSummaryImpl::SharedPointer { + static CXXFunctionSummaryFormat::SharedPointer formatter_sp(new CXXFunctionSummaryFormat(TypeSummaryImpl::Flags(), lldb_private::formatters::FunctionPointerSummaryProvider, "Function pointer summary provider")); + if (valobj.GetClangType().IsFunctionPointerType()) + { + return formatter_sp; + } + return nullptr; + }); } { // insert code to load synthetics here |