summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2024-09-07 17:02:43 -0700
committerJonas Devlieghere <jonas@devlieghere.com>2024-09-07 17:03:59 -0700
commitb93457073762bb347b6c7f39c23636dec036a815 (patch)
treed2a525ad867c34aaf61b0f87a3856cd39a049f7d /lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp
parentbcd586b5abfc7c22a1c0eca3a7abf18e7a09518d (diff)
[lldb] Update ScriptInterpreterLua for Status changes (NFC)
The Status constructor that takes an error has been removed in favor of Status::FromError.
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp')
-rw-r--r--lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp b/lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp
index ea74a500518e..896fc6951b85 100644
--- a/lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp
+++ b/lldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp
@@ -358,16 +358,16 @@ Status ScriptInterpreterLua::SetBreakpointCommandCallback(
Status ScriptInterpreterLua::RegisterBreakpointCallback(
BreakpointOptions &bp_options, const char *command_body_text,
StructuredData::ObjectSP extra_args_sp) {
- Status error;
auto data_up = std::make_unique<CommandDataLua>(extra_args_sp);
- error = m_lua->RegisterBreakpointCallback(data_up.get(), command_body_text);
- if (error.Fail())
- return error;
+ llvm::Error err =
+ m_lua->RegisterBreakpointCallback(data_up.get(), command_body_text);
+ if (err)
+ return Status::FromError(std::move(err));
auto baton_sp =
std::make_shared<BreakpointOptions::CommandBaton>(std::move(data_up));
bp_options.SetCallback(ScriptInterpreterLua::BreakpointCallbackFunction,
baton_sp);
- return error;
+ return {};
}
void ScriptInterpreterLua::SetWatchpointCommandCallback(
@@ -379,16 +379,16 @@ void ScriptInterpreterLua::SetWatchpointCommandCallback(
Status ScriptInterpreterLua::RegisterWatchpointCallback(
WatchpointOptions *wp_options, const char *command_body_text,
StructuredData::ObjectSP extra_args_sp) {
- Status error;
auto data_up = std::make_unique<WatchpointOptions::CommandData>();
- error = m_lua->RegisterWatchpointCallback(data_up.get(), command_body_text);
- if (error.Fail())
- return error;
+ llvm::Error err =
+ m_lua->RegisterWatchpointCallback(data_up.get(), command_body_text);
+ if (err)
+ return Status::FromError(std::move(err));
auto baton_sp =
std::make_shared<WatchpointOptions::CommandBaton>(std::move(data_up));
wp_options->SetCallback(ScriptInterpreterLua::WatchpointCallbackFunction,
baton_sp);
- return error;
+ return {};
}
lldb::ScriptInterpreterSP