[Lldb-commits] [lldb] draft: [lldb] Upgrade ValueObject::GetData to return llvm::Expected (PR #130516)

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 17 14:23:53 PDT 2025


================
@@ -540,9 +537,9 @@ class EntityVariableBase : public Materializer::Entity {
           return;
         }
 
-        if (data.GetByteSize() <
+        if (data_or_err->GetByteSize() <
----------------
adrian-prantl wrote:

I like to add a 
```
auto data = *data_or_err;
```
than there is no question about whether we forgot to check the error when accessing data. Makes to code easier to read.

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


More information about the lldb-commits mailing list