[Lldb-commits] [lldb] [lldb/Interpreter] Make ScriptedInterface Object creation more generic (PR #68052)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Tue Oct 24 10:05:56 PDT 2023
================
@@ -56,14 +56,17 @@ ScriptedThread::Create(ScriptedProcess &process,
}
ExecutionContext exe_ctx(process);
- StructuredData::GenericSP owned_script_object_sp =
- scripted_thread_interface->CreatePluginObject(
- thread_class_name, exe_ctx, process.m_scripted_metadata.GetArgsSP(),
- script_object);
+ auto obj_or_err = scripted_thread_interface->CreatePluginObject(
+ thread_class_name, exe_ctx, process.m_scripted_metadata.GetArgsSP(),
+ script_object);
- if (!owned_script_object_sp)
+ if (!obj_or_err) {
return llvm::createStringError(llvm::inconvertibleErrorCode(),
"Failed to create script object.");
+ }
----------------
JDevlieghere wrote:
No braces around single-line if.
https://github.com/llvm/llvm-project/pull/68052
More information about the lldb-commits
mailing list