[Lldb-commits] [lldb] [LLDB] Add more helper functions to ValueObject class. (PR #87197)
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Mon Apr 1 12:59:47 PDT 2024
================
@@ -441,6 +441,19 @@ class ValueObject {
virtual int64_t GetValueAsSigned(int64_t fail_value, bool *success = nullptr);
+ llvm::APSInt GetValueAsAPSInt();
+
+ llvm::APFloat GetValueAsFloat();
+
+ bool GetValueAsBool();
+
+ /// Update the value of the current object to be the integer in the 'value'
+ /// parameter.
+ void UpdateIntegerValue(const llvm::APInt &value);
----------------
clayborg wrote:
Should we name this similar to `SetValueFromCString(...)`? Something like: `SetValue(const llvm::APInt &value)` or `SetValueFromInteger(const llvm::APInt &value)`? Do we want an error to be returned in case this fails?
https://github.com/llvm/llvm-project/pull/87197
More information about the lldb-commits
mailing list