Skip to content

Commit a821a5f

Browse files
author
git apple-llvm automerger
committed
Merge commit 'c14ebf0185d2' from swift/release/6.2 into stable/20240723
2 parents c60981f + c14ebf0 commit a821a5f

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -370,16 +370,16 @@ Status ScriptInterpreterLua::SetBreakpointCommandCallback(
370370
Status ScriptInterpreterLua::RegisterBreakpointCallback(
371371
BreakpointOptions &bp_options, const char *command_body_text,
372372
StructuredData::ObjectSP extra_args_sp) {
373-
Status error;
374373
auto data_up = std::make_unique<CommandDataLua>(extra_args_sp);
375-
error = m_lua->RegisterBreakpointCallback(data_up.get(), command_body_text);
376-
if (error.Fail())
377-
return error;
374+
llvm::Error err =
375+
m_lua->RegisterBreakpointCallback(data_up.get(), command_body_text);
376+
if (err)
377+
return Status::FromError(std::move(err));
378378
auto baton_sp =
379379
std::make_shared<BreakpointOptions::CommandBaton>(std::move(data_up));
380380
bp_options.SetCallback(ScriptInterpreterLua::BreakpointCallbackFunction,
381381
baton_sp);
382-
return error;
382+
return {};
383383
}
384384

385385
void ScriptInterpreterLua::SetWatchpointCommandCallback(
@@ -391,16 +391,16 @@ void ScriptInterpreterLua::SetWatchpointCommandCallback(
391391
Status ScriptInterpreterLua::RegisterWatchpointCallback(
392392
WatchpointOptions *wp_options, const char *command_body_text,
393393
StructuredData::ObjectSP extra_args_sp) {
394-
Status error;
395394
auto data_up = std::make_unique<WatchpointOptions::CommandData>();
396-
error = m_lua->RegisterWatchpointCallback(data_up.get(), command_body_text);
397-
if (error.Fail())
398-
return error;
395+
llvm::Error err =
396+
m_lua->RegisterWatchpointCallback(data_up.get(), command_body_text);
397+
if (err)
398+
return Status::FromError(std::move(err));
399399
auto baton_sp =
400400
std::make_shared<WatchpointOptions::CommandBaton>(std::move(data_up));
401401
wp_options->SetCallback(ScriptInterpreterLua::WatchpointCallbackFunction,
402402
baton_sp);
403-
return error;
403+
return {};
404404
}
405405

406406
lldb::ScriptInterpreterSP

0 commit comments

Comments
 (0)