[lldb] Refactor Scalar::TruncOrExtendTo
authorPavel Labath <pavel@labath.sk>
Wed, 24 Jun 2020 13:26:42 +0000 (15:26 +0200)
committerPavel Labath <pavel@labath.sk>
Wed, 24 Jun 2020 13:58:33 +0000 (15:58 +0200)
commit16e17ca16a89daa099fd2726d92f08a49870e5a9
tree2d604b3d85262aeb78026c0fef661aa39d0a293b
parentc3b3b999ec9ef7e8d9367848db82c97a0369473f
[lldb] Refactor Scalar::TruncOrExtendTo

The "type" argument to the function is mostly useless -- the only
interesting aspect of it is signedness. Pass signedness directly and
compute the value of bits and signedness fields -- that's exactly
what the single caller of this function does.
lldb/include/lldb/Utility/Scalar.h
lldb/source/Expression/DWARFExpression.cpp
lldb/source/Utility/Scalar.cpp
lldb/unittests/Expression/DWARFExpressionTest.cpp
lldb/unittests/Utility/ScalarTest.cpp