summaryrefslogtreecommitdiffstats
path: root/lldb/source/DataFormatters/FormattersHelpers.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2015-09-17 00:14:50 +0000
committerEnrico Granata <egranata@apple.com>2015-09-17 00:14:50 +0000
commitfa6b278f9ca65c0c8a345d7fcad7392f5779be08 (patch)
treeddd54a5ba12f6f414a688b185870e0cbf410d95b /lldb/source/DataFormatters/FormattersHelpers.cpp
parentbf8f00586a8627eb9bfe71771a58cdca5a7af5da (diff)
downloadbcm5719-llvm-fa6b278f9ca65c0c8a345d7fcad7392f5779be08.tar.gz
bcm5719-llvm-fa6b278f9ca65c0c8a345d7fcad7392f5779be08.zip
Add the ability for formatter categories to be bound to one or more languages
What that does is it restricts formatters in those categories to only match to types coming from "compatible" source languages llvm-svn: 247872
Diffstat (limited to 'lldb/source/DataFormatters/FormattersHelpers.cpp')
-rw-r--r--lldb/source/DataFormatters/FormattersHelpers.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lldb/source/DataFormatters/FormattersHelpers.cpp b/lldb/source/DataFormatters/FormattersHelpers.cpp
index ba5f6c04f78..c2fcb98ec88 100644
--- a/lldb/source/DataFormatters/FormattersHelpers.cpp
+++ b/lldb/source/DataFormatters/FormattersHelpers.cpp
@@ -40,6 +40,17 @@ lldb_private::formatters::AddFormat (TypeCategoryImpl::SharedPointer category_sp
category_sp->GetTypeFormatsContainer()->Add(type_name, format_sp);
}
+void
+lldb_private::formatters::AddSummary(TypeCategoryImpl::SharedPointer category_sp,
+ TypeSummaryImplSP summary_sp,
+ ConstString type_name,
+ bool regex)
+{
+ if (regex)
+ category_sp->GetRegexTypeSummariesContainer()->Add(RegularExpressionSP(new RegularExpression(type_name.AsCString())),summary_sp);
+ else
+ category_sp->GetTypeSummariesContainer()->Add(type_name, summary_sp);
+}
void
lldb_private::formatters::AddStringSummary(TypeCategoryImpl::SharedPointer category_sp,
OpenPOWER on IntegriCloud