[Lldb-commits] [lldb] draft: [lldb] Upgrade ValueObject::GetData to return llvm::Expected (PR #130516)
Julius Alexandre via lldb-commits
lldb-commits at lists.llvm.org
Sat Mar 22 07:55:17 PDT 2025
================
@@ -523,13 +522,11 @@ class EntityVariableBase : public Materializer::Entity {
return;
}
} else {
- DataExtractor data;
- Status extract_error;
- valobj_sp->GetData(data, extract_error);
- if (!extract_error.Success()) {
+ auto data_or_err = valobj_sp->GetData();
+ if (auto error = data_or_err.takeError()) {
err = Status::FromErrorStringWithFormat(
"couldn't get the value of %s: %s", GetName().AsCString(),
- extract_error.AsCString());
+ llvm::toString(std::move(error)).c_str());
----------------
wizardengineer wrote:
I don't seem as if I can directly just do a `llvm::joinErrors`, `err` argument is a `lldb_private::Status`. I don't think there's any conversions from `Status` to `llvm::Errors`. I could be wrong.
https://github.com/llvm/llvm-project/pull/130516
More information about the lldb-commits
mailing list