mirror of
https://github.com/intel/llvm.git
synced 2026-01-14 03:50:17 +08:00
Reimplementing SBValue/ValueObject.GetValueAsUnsigned() in terms of appropriate calls in Scalar - Making sure Scalar does the right thing when casting signed values to unsigned ones.
llvm-svn: 166618
This commit is contained in:
@@ -1284,7 +1284,7 @@ SBValue::GetValueAsUnsigned(SBError& error, uint64_t fail_value)
|
||||
Mutex::Locker api_locker (target_sp->GetAPIMutex());
|
||||
Scalar scalar;
|
||||
if (value_sp->ResolveValue (scalar))
|
||||
return scalar.GetRawBits64(fail_value);
|
||||
return scalar.ULongLong(fail_value);
|
||||
else
|
||||
error.SetErrorString("could not get value");
|
||||
}
|
||||
@@ -1347,7 +1347,7 @@ SBValue::GetValueAsUnsigned(uint64_t fail_value)
|
||||
Mutex::Locker api_locker (target_sp->GetAPIMutex());
|
||||
Scalar scalar;
|
||||
if (value_sp->ResolveValue (scalar))
|
||||
return scalar.GetRawBits64(fail_value);
|
||||
return scalar.ULongLong(fail_value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user