@@ -370,16 +370,16 @@ Status ScriptInterpreterLua::SetBreakpointCommandCallback(
370
370
Status ScriptInterpreterLua::RegisterBreakpointCallback (
371
371
BreakpointOptions &bp_options, const char *command_body_text,
372
372
StructuredData::ObjectSP extra_args_sp) {
373
- Status error;
374
373
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));
378
378
auto baton_sp =
379
379
std::make_shared<BreakpointOptions::CommandBaton>(std::move (data_up));
380
380
bp_options.SetCallback (ScriptInterpreterLua::BreakpointCallbackFunction,
381
381
baton_sp);
382
- return error ;
382
+ return {} ;
383
383
}
384
384
385
385
void ScriptInterpreterLua::SetWatchpointCommandCallback (
@@ -391,16 +391,16 @@ void ScriptInterpreterLua::SetWatchpointCommandCallback(
391
391
Status ScriptInterpreterLua::RegisterWatchpointCallback (
392
392
WatchpointOptions *wp_options, const char *command_body_text,
393
393
StructuredData::ObjectSP extra_args_sp) {
394
- Status error;
395
394
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));
399
399
auto baton_sp =
400
400
std::make_shared<WatchpointOptions::CommandBaton>(std::move (data_up));
401
401
wp_options->SetCallback (ScriptInterpreterLua::WatchpointCallbackFunction,
402
402
baton_sp);
403
- return error ;
403
+ return {} ;
404
404
}
405
405
406
406
lldb::ScriptInterpreterSP
0 commit comments