From 82d760879f62430d7969fac435908ed9d754bcc5 Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Fri, 18 Nov 2016 05:45:41 +0000 Subject: Remove an out param from ValueObject::GetValueForExpressionPath. This argument was only used in one place in the codebase, and it was in a non-critical log statement and can be easily substituted for an equally meaningful field instead. The payoff of computing this value is not worth the added complexity. llvm-svn: 287315 --- lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp') diff --git a/lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp b/lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp index 82f1a5dd9a5..82441a69b1d 100644 --- a/lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp +++ b/lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp @@ -280,7 +280,7 @@ bool lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEnd::Update() { // die and free their memory m_pair_ptr = valobj_sp ->GetValueForExpressionPath( - ".__i_.__ptr_->__value_", nullptr, nullptr, nullptr, + ".__i_.__ptr_->__value_", nullptr, nullptr, ValueObject::GetValueForExpressionPathOptions() .DontCheckDotVsArrowSyntax() .SetSyntheticChildrenTraversal( @@ -288,16 +288,18 @@ bool lldb_private::formatters::LibCxxMapIteratorSyntheticFrontEnd::Update() { SyntheticChildrenTraversal::None), nullptr) .get(); - + if (!m_pair_ptr) { - m_pair_ptr = valobj_sp->GetValueForExpressionPath(".__i_.__ptr_", nullptr, nullptr, nullptr, - ValueObject::GetValueForExpressionPathOptions() - .DontCheckDotVsArrowSyntax() - .SetSyntheticChildrenTraversal( - ValueObject::GetValueForExpressionPathOptions:: - SyntheticChildrenTraversal::None), - nullptr) - .get(); + m_pair_ptr = valobj_sp + ->GetValueForExpressionPath( + ".__i_.__ptr_", nullptr, nullptr, + ValueObject::GetValueForExpressionPathOptions() + .DontCheckDotVsArrowSyntax() + .SetSyntheticChildrenTraversal( + ValueObject::GetValueForExpressionPathOptions:: + SyntheticChildrenTraversal::None), + nullptr) + .get(); if (m_pair_ptr) { auto __i_(valobj_sp->GetChildMemberWithName(g___i_, true)); lldb::TemplateArgumentKind kind; -- cgit v1.2.3