[Lldb-commits] [PATCH] D61311: PostfixExpression: Use signed integers in IntegerNode

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu May 2 02:01:03 PDT 2019

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

Comment at: include/lldb/Symbol/PostfixExpression.h:97
-  uint32_t m_value;
+  int64_t m_value;
clayborg wrote:
> Do we want to try and use lldb_private::Scalar here? Then this could handle signed/unsigned ints, floats and anything else that comes along? Might need to be renamed "ScalarNode"? All of the type promotion stuff is already built into those classes.
I think that would be too generic for the current use case. For instance, that'd mean I'd have to figure out how to serialize the floats into a dwarf expression. I'm not sure if that's possible, but it doesn't seem terribly useful, as the purpose of these expressions is to compute addresses of stuff, and addresses are integral. If it turns out 64 bit signed int isn't enough, then I'd go for `llvm::APSInt`, but so far I don't see anything which would suggest that will ever be the case.



More information about the lldb-commits mailing list