summaryrefslogtreecommitdiffstats
path: root/lldb/source/DataFormatters/DataVisualization.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2014-09-05 20:45:07 +0000
committerEnrico Granata <egranata@apple.com>2014-09-05 20:45:07 +0000
commitc582713ce6d050f00246114abdce9e220047518a (patch)
tree9ca75d0c8d4e9c34d735b1d4ac688e2780490603 /lldb/source/DataFormatters/DataVisualization.cpp
parentafe6794bc2ee35880e970e7e9fcde6c2ad72b51b (diff)
downloadbcm5719-llvm-c582713ce6d050f00246114abdce9e220047518a.tar.gz
bcm5719-llvm-c582713ce6d050f00246114abdce9e220047518a.zip
Introduce the notion of a "type validator" formatter
Type Validators have the purpose of looking at a ValueObject, and making sure that there is nothing semantically wrong about the object's contents For instance, if you have a class that represents a speed, the validator might trigger if the speed value is greater than the speed of light This first patch hooks up the moving parts in the formatters subsystem, but does not link ValueObjects to TypeValidators, nor lets the SB API be exposed to validators It also lacks the notion of Python validators llvm-svn: 217277
Diffstat (limited to 'lldb/source/DataFormatters/DataVisualization.cpp')
-rw-r--r--lldb/source/DataFormatters/DataVisualization.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/lldb/source/DataFormatters/DataVisualization.cpp b/lldb/source/DataFormatters/DataVisualization.cpp
index c2c2206f344..8799c59103e 100644
--- a/lldb/source/DataFormatters/DataVisualization.cpp
+++ b/lldb/source/DataFormatters/DataVisualization.cpp
@@ -101,6 +101,18 @@ DataVisualization::GetSyntheticForType (lldb::TypeNameSpecifierImplSP type_sp)
}
#endif
+lldb::TypeValidatorImplSP
+DataVisualization::GetValidator (ValueObject& valobj, lldb::DynamicValueType use_dynamic)
+{
+ return GetFormatManager().GetValidator(valobj, use_dynamic);
+}
+
+lldb::TypeValidatorImplSP
+DataVisualization::GetValidatorForType (lldb::TypeNameSpecifierImplSP type_sp)
+{
+ return GetFormatManager().GetValidatorForType(type_sp);
+}
+
bool
DataVisualization::AnyMatches (ConstString type_name,
TypeCategoryImpl::FormatCategoryItems items,
OpenPOWER on IntegriCloud