From a0db6ed44b05d37c4ec4c3548dda5cdef2e8a4ac Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Wed, 9 Apr 2014 21:06:11 +0000 Subject: Set the correct FormatManager revision before starting to figure out the new formatters This can avoid entering some corner cases where as part of figuring out formatters we try to figure out dynamic types, and in turn that causes us to go back in trying to fetch new formatters - it is not only a futile exercise, it's also prone to endless recursion This would only cause a behavior change if getting this chain started would eventually cause something to run and alter the formatters, a very unlikely if at all possible sequence of events llvm-svn: 205928 --- lldb/source/Core/ValueObject.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'lldb/source/Core/ValueObject.cpp') diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp index 90d30d2593d..f6a3d53032b 100644 --- a/lldb/source/Core/ValueObject.cpp +++ b/lldb/source/Core/ValueObject.cpp @@ -245,15 +245,14 @@ ValueObject::UpdateFormatsIfNeeded() if ( (m_last_format_mgr_revision != DataVisualization::GetCurrentRevision())) { + m_last_format_mgr_revision = DataVisualization::GetCurrentRevision(); + any_change = true; + SetValueFormat(DataVisualization::GetFormat (*this, eNoDynamicValues)); SetSummaryFormat(DataVisualization::GetSummaryFormat (*this, GetDynamicValueType())); #ifndef LLDB_DISABLE_PYTHON SetSyntheticChildren(DataVisualization::GetSyntheticChildren (*this, GetDynamicValueType())); #endif - - m_last_format_mgr_revision = DataVisualization::GetCurrentRevision(); - - any_change = true; } return any_change; -- cgit v1.2.3