summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/FormatEntity.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-11-18 17:55:04 +0000
committerZachary Turner <zturner@google.com>2016-11-18 17:55:04 +0000
commitd2daca770b4bd45e83da9e16413f952179bf228d (patch)
tree5f04d1eb25f99b3122059f61a3bfdd682fbd6b44 /lldb/source/Core/FormatEntity.cpp
parentaeacdc258b2ca3579037925c5a1630ed4df2de35 (diff)
downloadbcm5719-llvm-d2daca770b4bd45e83da9e16413f952179bf228d.tar.gz
bcm5719-llvm-d2daca770b4bd45e83da9e16413f952179bf228d.zip
Resubmit "Remove an output-parameter from Variable function".
The scanning algorithm had a few little subtleties that I overlooked, but this patch should fix everything. I still haven't changed the function to take a StringRef since that has some trickle down effect and is mostly mechanical, I just wanted to get the tricky part as isolated as possible. llvm-svn: 287354
Diffstat (limited to 'lldb/source/Core/FormatEntity.cpp')
-rw-r--r--lldb/source/Core/FormatEntity.cpp36
1 files changed, 15 insertions, 21 deletions
diff --git a/lldb/source/Core/FormatEntity.cpp b/lldb/source/Core/FormatEntity.cpp
index 4d85c3686c2..08166d208ae 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,"
+ log->Printf("[ExpandIndexedExpression] ALL RIGHT: why stopping = %d,"
" final_value_type %d",
- first_unparsed, reason_to_stop, final_value_type);
+ 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,"
+ log->Printf("[Debugger::FormatPrompt] ERROR: why stopping = %d,"
" final_value_type %d",
- first_unparsed, reason_to_stop, final_value_type);
+ reason_to_stop, final_value_type);
return false;
} else {
if (log)
- log->Printf("[Debugger::FormatPrompt] ALL RIGHT: unparsed portion = "
- "%s, why stopping = %d,"
+ log->Printf("[Debugger::FormatPrompt] ALL RIGHT: why stopping = %d,"
" final_value_type %d",
- first_unparsed, reason_to_stop, final_value_type);
+ reason_to_stop, final_value_type);
target = target
->GetQualifiedRepresentationIfAvailable(
target->GetDynamicValueType(), true)
OpenPOWER on IntegriCloud