Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit e296e88

Browse files
dccitromey
authored andcommitted
[Core] Grab-bag of improvements for Scalar.
Remove Scalar::Cast. It was noted on the list that this method is unused. So, this patch removes it. Fix Scalar::Promote for most integer types This fixes promotion of most integer types (128- and 256-bit types are handled in a subsequent patch) to floating-point types. Previously promotion was done bitwise, where value preservation is correct. Fix Scalar::Promote for 128- and 256-bit integer types This patch fixes the behavior of Scalar::Promote when trying to perform a binary operation involving a 128- or 256-bit integer type and a floating-point type. Now, the integer is cast to the floating point type for the operation. Patch by Tom Tromey! Differential Revision: https://reviews.llvm.org/D44907 git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@328985 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent c71c249 commit e296e88

File tree

3 files changed

+166
-332
lines changed

3 files changed

+166
-332
lines changed

include/lldb/Core/Scalar.h

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@ class Scalar {
5050
e_ulong,
5151
e_slonglong,
5252
e_ulonglong,
53-
e_float,
54-
e_double,
55-
e_long_double,
56-
e_uint128,
5753
e_sint128,
54+
e_uint128,
55+
e_sint256,
5856
e_uint256,
59-
e_sint256
57+
e_float,
58+
e_double,
59+
e_long_double
6060
};
6161

6262
//------------------------------------------------------------------
@@ -165,8 +165,6 @@ class Scalar {
165165

166166
bool Promote(Scalar::Type type);
167167

168-
bool Cast(Scalar::Type type);
169-
170168
bool MakeSigned();
171169

172170
bool MakeUnsigned();

0 commit comments

Comments
 (0)