[Lldb-commits] [PATCH] D85836: [lldb/Utility] Simplify and generalize Scalar class

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 12 07:19:35 PDT 2020

labath created this revision.
labath added reviewers: teemperor, JDevlieghere.
Herald added a project: LLDB.
labath requested review of this revision.

The class contains an enum listing all host integer types as well as
some non-host types. This setup is a remnant of a time when this class
was actually implemented in terms of host integer types. Now that we are
using llvm::APInt, they are mostly useless and mean that each function
needs to enumerate all of these cases even though it treats most of them

I only leave e_sint and e_uint to denote the integer signedness, but I
want to remove that in a follow-up as well.

Removing these cases simplifies most of these functions, with the only
exception being PromoteToMaxType, which can no longer rely on a simple
enum comparison to determine what needs to be promoted.

This also makes the class ready to work with arbitrary integer sizes, so
it does not need to be modified when someone needs to add a larger
integer size.

  rG LLVM Github Monorepo



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85836.285075.patch
Type: text/x-patch
Size: 25957 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200812/e1e7d305/attachment-0001.bin>

More information about the lldb-commits mailing list