mirror of
https://github.com/intel/llvm.git
synced 2026-01-17 14:48:27 +08:00
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
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user