diff options
author | Pavel Labath <labath@google.com> | 2016-09-02 10:58:52 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2016-09-02 10:58:52 +0000 |
commit | f92756e9ec18720f0235f89d3eedbd0aff39db15 (patch) | |
tree | d0a9db1eb734027d81845b4ea7612efef0c6516f /lldb/source/Core/Scalar.cpp | |
parent | 0f0ef132aff2ac6d4e095da3b1f3b83c106dd8c1 (diff) | |
download | bcm5719-llvm-f92756e9ec18720f0235f89d3eedbd0aff39db15.tar.gz bcm5719-llvm-f92756e9ec18720f0235f89d3eedbd0aff39db15.zip |
Reapply "Make Scalar::GetValue more consistent"
this is a resubmission of r280476. The problem with the original commit was that it was printing
out all numbers as signed, which was wrong for unsigned numbers with the MSB set. Fix that and
add a unit test covering that case.
llvm-svn: 280480
Diffstat (limited to 'lldb/source/Core/Scalar.cpp')
-rw-r--r-- | lldb/source/Core/Scalar.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/Core/Scalar.cpp b/lldb/source/Core/Scalar.cpp index d3e9a756504..ae0e2169ebc 100644 --- a/lldb/source/Core/Scalar.cpp +++ b/lldb/source/Core/Scalar.cpp @@ -308,18 +308,18 @@ Scalar::GetValue (Stream *s, bool show_type) const case e_void: break; case e_sint: - case e_ulong: + case e_slong: case e_slonglong: case e_sint128: case e_sint256: - s->Printf("%s",m_integer.toString(10,true).c_str()); + s->PutCString(m_integer.toString(10, true).c_str()); break; case e_uint: - case e_slong: + case e_ulong: case e_ulonglong: case e_uint128: case e_uint256: - s->Printf("%s",m_integer.toString(16,false).c_str()); + s->PutCString(m_integer.toString(10, false).c_str()); break; case e_float: case e_double: |