aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Expression/Materializer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Expression/Materializer.cpp')
-rw-r--r--lldb/source/Expression/Materializer.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/lldb/source/Expression/Materializer.cpp b/lldb/source/Expression/Materializer.cpp
index e86afb6..291f81e 100644
--- a/lldb/source/Expression/Materializer.cpp
+++ b/lldb/source/Expression/Materializer.cpp
@@ -869,20 +869,18 @@ public:
return;
}
- Status type_system_error;
- TypeSystem *type_system = target_sp->GetScratchTypeSystemForLanguage(
- &type_system_error, m_type.GetMinimumLanguage());
+ auto type_system_or_err =
+ target_sp->GetScratchTypeSystemForLanguage(m_type.GetMinimumLanguage());
- if (!type_system) {
+ if (auto error = type_system_or_err.takeError()) {
err.SetErrorStringWithFormat("Couldn't dematerialize a result variable: "
"couldn't get the corresponding type "
"system: %s",
- type_system_error.AsCString());
+ llvm::toString(std::move(error)).c_str());
return;
}
-
PersistentExpressionState *persistent_state =
- type_system->GetPersistentExpressionState();
+ type_system_or_err->GetPersistentExpressionState();
if (!persistent_state) {
err.SetErrorString("Couldn't dematerialize a result variable: "