diff options
author | Enrico Granata <granata.enrico@gmail.com> | 2011-09-06 22:59:55 +0000 |
---|---|---|
committer | Enrico Granata <granata.enrico@gmail.com> | 2011-09-06 22:59:55 +0000 |
commit | 855cd9012c292f0e279301cf262163f7141654d0 (patch) | |
tree | 8a1f1d573be6b35155bd5cc8550d3749362c0229 /lldb/source/Core/DataVisualization.cpp | |
parent | 83a6188f183154e7c630dcb6c8e17c47b5a4c186 (diff) | |
download | bcm5719-llvm-855cd9012c292f0e279301cf262163f7141654d0.tar.gz bcm5719-llvm-855cd9012c292f0e279301cf262163f7141654d0.zip |
Refactoring of Get() methods in FormatManager/FormatCategory to have explicative names and return shared-pointers instead of bools
Reduced the amount of memory required to avoid loops in DumpPrintableRepresentation() from 32 bits down to 1 bit
- Additionally, disallowed creating summary strings of the form ${var%S} which did nothing but cause endless loops by definition
llvm-svn: 139201
Diffstat (limited to 'lldb/source/Core/DataVisualization.cpp')
-rw-r--r-- | lldb/source/Core/DataVisualization.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/lldb/source/Core/DataVisualization.cpp b/lldb/source/Core/DataVisualization.cpp index 7c326ed6ec0..3b310ebf0df 100644 --- a/lldb/source/Core/DataVisualization.cpp +++ b/lldb/source/Core/DataVisualization.cpp @@ -38,10 +38,12 @@ DataVisualization::GetCurrentRevision () return GetFormatManager().GetCurrentRevision(); } -bool -DataVisualization::ValueFormats::Get (ValueObject& valobj, lldb::DynamicValueType use_dynamic, lldb::ValueFormatSP &entry) +lldb::ValueFormatSP +DataVisualization::ValueFormats::Get (ValueObject& valobj, lldb::DynamicValueType use_dynamic) { - return GetFormatManager().GetValueNavigator().Get(valobj,entry, use_dynamic); + lldb::ValueFormatSP entry; + GetFormatManager().GetValueNavigator().Get(valobj, entry, use_dynamic); + return entry; } void @@ -74,19 +76,18 @@ DataVisualization::ValueFormats::GetCount () return GetFormatManager().GetValueNavigator().GetCount(); } -bool +lldb::SummaryFormatSP DataVisualization::GetSummaryFormat (ValueObject& valobj, - lldb::DynamicValueType use_dynamic, - lldb::SummaryFormatSP& entry) + lldb::DynamicValueType use_dynamic) { - return GetFormatManager().Get(valobj, entry, use_dynamic); + return GetFormatManager().GetSummaryFormat(valobj, use_dynamic); } -bool + +lldb::SyntheticChildrenSP DataVisualization::GetSyntheticChildren (ValueObject& valobj, - lldb::DynamicValueType use_dynamic, - lldb::SyntheticChildrenSP& entry) + lldb::DynamicValueType use_dynamic) { - return GetFormatManager().Get(valobj, entry, use_dynamic); + return GetFormatManager().GetSyntheticChildren(valobj, use_dynamic); } bool |