OSDN Git Service

[lldb/Utility] Fix float->integral conversions in Scalar APInt getters
authorPavel Labath <pavel@labath.sk>
Tue, 7 Jul 2020 14:56:05 +0000 (16:56 +0200)
committerPavel Labath <pavel@labath.sk>
Tue, 7 Jul 2020 14:59:06 +0000 (16:59 +0200)
commit52495b98eecefcbaea2e30edec6816e43653d175
tree377015947c081948490dc0532fcd1372d5f9e211
parent082e3952300003ecf2eaa6bf346ae2e783b7a02e
[lldb/Utility] Fix float->integral conversions in Scalar APInt getters

These functions were doing a bitcast on the float value, which is not
consistent with the other getters, which were doing a numeric conversion
(47.0 -> 47). Change these to do numeric conversions too.
lldb/source/Utility/Scalar.cpp
lldb/unittests/Utility/ScalarTest.cpp