[Lldb-commits] [PATCH] D67369: Implement DW_OP_convert

Adrian Prantl via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Sep 9 16:11:44 PDT 2019


aprantl marked an inline comment as done.
aprantl added inline comments.


================
Comment at: lldb/source/Utility/Scalar.cpp:423
+    if (bit_size <= sizeof(int)*8) return Scalar::e_sint;
+    if (bit_size <= sizeof(long)*8) return Scalar::e_slong;
+    if (bit_size <= sizeof(long long)*8) return Scalar::e_slonglong;
----------------
aprantl wrote:
> jasonmolenda wrote:
> > What about an ILP32 target like arm64_32, with lldb running on an LP64 system - are we mixing target & host type sizes here?  I'm not sure if Scalar's types (e_slong etc) are in host or target terms.  I mean this code might as well be if bit_size <= 32 return Scalar::e_Signed32BitType, but I wanted to check in because we're using host type sizes here.
> As the comment on line 420 above says: 
> `// Scalar types are always host types, hence the sizeof().`
Note that I think the decision of making Scalar types host types very questionable and it would make much more sense for it to be target types, but the way the Scalar constructors are implemented they are definitely host types.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67369/new/

https://reviews.llvm.org/D67369





More information about the lldb-commits mailing list