@@ -358,16 +358,16 @@ Status ScriptInterpreterLua::SetBreakpointCommandCallback(
358
358
Status ScriptInterpreterLua::RegisterBreakpointCallback (
359
359
BreakpointOptions &bp_options, const char *command_body_text,
360
360
StructuredData::ObjectSP extra_args_sp) {
361
- Status error;
362
361
auto data_up = std::make_unique<CommandDataLua>(extra_args_sp);
363
- error = m_lua->RegisterBreakpointCallback (data_up.get (), command_body_text);
364
- if (error.Fail ())
365
- return error;
362
+ llvm::Error err =
363
+ m_lua->RegisterBreakpointCallback (data_up.get (), command_body_text);
364
+ if (err)
365
+ return Status::FromError (std::move (err));
366
366
auto baton_sp =
367
367
std::make_shared<BreakpointOptions::CommandBaton>(std::move (data_up));
368
368
bp_options.SetCallback (ScriptInterpreterLua::BreakpointCallbackFunction,
369
369
baton_sp);
370
- return error ;
370
+ return {} ;
371
371
}
372
372
373
373
void ScriptInterpreterLua::SetWatchpointCommandCallback (
@@ -379,16 +379,16 @@ void ScriptInterpreterLua::SetWatchpointCommandCallback(
379
379
Status ScriptInterpreterLua::RegisterWatchpointCallback (
380
380
WatchpointOptions *wp_options, const char *command_body_text,
381
381
StructuredData::ObjectSP extra_args_sp) {
382
- Status error;
383
382
auto data_up = std::make_unique<WatchpointOptions::CommandData>();
384
- error = m_lua->RegisterWatchpointCallback (data_up.get (), command_body_text);
385
- if (error.Fail ())
386
- return error;
383
+ llvm::Error err =
384
+ m_lua->RegisterWatchpointCallback (data_up.get (), command_body_text);
385
+ if (err)
386
+ return Status::FromError (std::move (err));
387
387
auto baton_sp =
388
388
std::make_shared<WatchpointOptions::CommandBaton>(std::move (data_up));
389
389
wp_options->SetCallback (ScriptInterpreterLua::WatchpointCallbackFunction,
390
390
baton_sp);
391
- return error ;
391
+ return {} ;
392
392
}
393
393
394
394
lldb::ScriptInterpreterSP
0 commit comments