[Lldb-commits] [lldb] [LLDB] Add assignment to DIL. (PR #190223)

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Tue Jun 2 12:48:16 PDT 2026


================
@@ -1227,87 +1227,83 @@ llvm::Expected<bool> ValueObject::GetValueAsBool() {
   return llvm::createStringError("type cannot be converted to bool");
 }
 
-void ValueObject::SetValueFromInteger(const llvm::APInt &value, Status &error,
-                                      bool can_update_var) {
+llvm::Error ValueObject::SetValueFromInteger(const llvm::APInt &value,
+                                             bool can_update_var) {
   // Verify the current object is an integer object
   CompilerType val_type = GetCompilerType();
   if (!val_type.IsInteger() && !val_type.IsUnscopedEnumerationType() &&
       !HasFloatingRepresentation(val_type) && !val_type.IsPointerType() &&
-      !val_type.IsScalarType()) {
-    error =
-        Status::FromErrorString("current value object is not an scalar object");
-    return;
-  }
+      !val_type.IsScalarType())
+    return llvm::createStringError(
+        "current value object is not an scalar object");
 
   // Verify, if current object is associated with a program variable, that
   // we are allowing updating program variables in this case.
-  if (GetVariable() && !can_update_var) {
-    error = Status::FromErrorString(
+  if (GetVariable() && !can_update_var)
+    return llvm::createStringError(
----------------
adrian-prantl wrote:

The capitalization of the error messages is really inconsistent in this file.

https://github.com/llvm/llvm-project/pull/190223


More information about the lldb-commits mailing list