diff options
author | Zachary Turner <zturner@google.com> | 2016-11-18 05:45:41 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2016-11-18 05:45:41 +0000 |
commit | 82d760879f62430d7969fac435908ed9d754bcc5 (patch) | |
tree | c109feab712606348e2e1b96cb5c12860b2b3f9d /lldb/source/Core/FormatEntity.cpp | |
parent | 77f2a875759a68c91cb9b2fc82bd6a0ba6eb5581 (diff) | |
download | bcm5719-llvm-82d760879f62430d7969fac435908ed9d754bcc5.tar.gz bcm5719-llvm-82d760879f62430d7969fac435908ed9d754bcc5.zip |
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
Diffstat (limited to 'lldb/source/Core/FormatEntity.cpp')
-rw-r--r-- | lldb/source/Core/FormatEntity.cpp | 42 |
1 files changed, 18 insertions, 24 deletions
diff --git a/lldb/source/Core/FormatEntity.cpp b/lldb/source/Core/FormatEntity.cpp index 4d85c3686c2..f9da3f7a707 100644 --- a/lldb/source/Core/FormatEntity.cpp +++ b/lldb/source/Core/FormatEntity.cpp @@ -614,7 +614,6 @@ static ValueObjectSP ExpandIndexedExpression(ValueObject *valobj, size_t index, if (log) log->Printf("[ExpandIndexedExpression] name to deref: %s", ptr_deref_buffer.c_str()); - const char *first_unparsed; ValueObject::GetValueForExpressionPathOptions options; ValueObject::ExpressionPathEndResultType final_value_type; ValueObject::ExpressionPathScanEndReason reason_to_stop; @@ -622,20 +621,18 @@ static ValueObjectSP ExpandIndexedExpression(ValueObject *valobj, size_t index, (deref_pointer ? ValueObject::eExpressionPathAftermathDereference : ValueObject::eExpressionPathAftermathNothing); ValueObjectSP item = valobj->GetValueForExpressionPath( - ptr_deref_buffer.c_str(), &first_unparsed, &reason_to_stop, - &final_value_type, options, &what_next); + ptr_deref_buffer.c_str(), &reason_to_stop, &final_value_type, options, + &what_next); if (!item) { if (log) - log->Printf("[ExpandIndexedExpression] ERROR: unparsed portion = %s, why " - "stopping = %d," + log->Printf("[ExpandIndexedExpression] ERROR: why stopping = %d," " final_value_type %d", - first_unparsed, reason_to_stop, final_value_type); + reason_to_stop, final_value_type); } else { if (log) - log->Printf("[ExpandIndexedExpression] ALL RIGHT: unparsed portion = %s, " - "why stopping = %d," - " final_value_type %d", - first_unparsed, reason_to_stop, final_value_type); + log->Printf("[ExpandIndexedExpression] ALL RIGHT: why stopping = %d, " + "final_value_type %d", + reason_to_stop, final_value_type); } return item; } @@ -724,7 +721,6 @@ static bool DumpValue(Stream &s, const SymbolContext *sc, int64_t index_lower = -1; int64_t index_higher = -1; bool is_array_range = false; - const char *first_unparsed; bool was_plain_var = false; bool was_var_format = false; bool was_var_indexed = false; @@ -762,25 +758,23 @@ static bool DumpValue(Stream &s, const SymbolContext *sc, log->Printf("[Debugger::FormatPrompt] symbol to expand: %s", expr_path.c_str()); - target = valobj - ->GetValueForExpressionPath(expr_path.c_str(), &first_unparsed, - &reason_to_stop, &final_value_type, - options, &what_next) - .get(); + target = + valobj + ->GetValueForExpressionPath(expr_path.c_str(), &reason_to_stop, + &final_value_type, options, &what_next) + .get(); if (!target) { if (log) - log->Printf("[Debugger::FormatPrompt] ERROR: unparsed portion = %s, " - "why stopping = %d," - " final_value_type %d", - first_unparsed, reason_to_stop, final_value_type); + log->Printf("[Debugger::FormatPrompt] ERROR: expr = %s, " + "why stopping = %d, final_value_type %d", + expr_path.c_str(), reason_to_stop, final_value_type); return false; } else { if (log) - log->Printf("[Debugger::FormatPrompt] ALL RIGHT: unparsed portion = " - "%s, why stopping = %d," - " final_value_type %d", - first_unparsed, reason_to_stop, final_value_type); + log->Printf("[Debugger::FormatPrompt] ALL RIGHT: expr = %s, " + "why stopping = %d, final_value_type %d", + expr_path.c_str(), reason_to_stop, final_value_type); target = target ->GetQualifiedRepresentationIfAvailable( target->GetDynamicValueType(), true) |