mirror of
https://github.com/intel/llvm.git
synced 2026-01-18 07:57:36 +08:00
APIs to GetValueAsSigned/Unsigned() in SBValue now also accept an SBError parameter to give more info about any problem
The synthetic children providers now use the new (safer) APIs to get the values of objects As a side effect, fixed an issue in ValueObject where ResolveValue() was not always updating the value before reading it llvm-svn: 136861
This commit is contained in:
@@ -331,12 +331,17 @@ ValueObject::GetValue() const
|
||||
bool
|
||||
ValueObject::ResolveValue (Scalar &scalar)
|
||||
{
|
||||
ExecutionContext exe_ctx;
|
||||
ExecutionContextScope *exe_scope = GetExecutionContextScope();
|
||||
if (exe_scope)
|
||||
exe_scope->CalculateExecutionContext(exe_ctx);
|
||||
scalar = m_value.ResolveValue(&exe_ctx, GetClangAST ());
|
||||
return scalar.IsValid();
|
||||
if (UpdateValueIfNeeded(false)) // make sure that you are up to date before returning anything
|
||||
{
|
||||
ExecutionContext exe_ctx;
|
||||
ExecutionContextScope *exe_scope = GetExecutionContextScope();
|
||||
if (exe_scope)
|
||||
exe_scope->CalculateExecutionContext(exe_ctx);
|
||||
scalar = m_value.ResolveValue(&exe_ctx, GetClangAST ());
|
||||
return scalar.IsValid();
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
|
||||
Reference in New Issue
Block a user