diff options
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python')
3 files changed, 10 insertions, 6 deletions
diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface.cpp index 8ba31b3..f5fc337 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedProcessPythonInterface.cpp @@ -111,7 +111,7 @@ bool ScriptedProcessPythonInterface::CreateBreakpoint(lldb::addr_t addr, // If there was an error on the python call, surface it to the user. if (py_error.Fail()) - error = py_error; + error = std::move(py_error); if (!ScriptedInterface::CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, obj, error)) @@ -128,7 +128,7 @@ lldb::DataExtractorSP ScriptedProcessPythonInterface::ReadMemoryAtAddress( // If there was an error on the python call, surface it to the user. if (py_error.Fail()) - error = py_error; + error = std::move(py_error); return data_sp; } @@ -145,7 +145,7 @@ lldb::offset_t ScriptedProcessPythonInterface::WriteMemoryAtAddress( // If there was an error on the python call, surface it to the user. if (py_error.Fail()) - error = py_error; + error = std::move(py_error); return obj->GetUnsignedIntegerValue(LLDB_INVALID_OFFSET); } diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h index c1dcdc7..cb6f6ec 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/Interfaces/ScriptedPythonInterface.h @@ -309,8 +309,12 @@ protected: return python::PythonBoolean(arg); } - python::PythonObject Transform(Status arg) { - return python::SWIGBridge::ToSWIGWrapper(arg); + python::PythonObject Transform(const Status &arg) { + return python::SWIGBridge::ToSWIGWrapper(arg.Clone()); + } + + python::PythonObject Transform(Status &&arg) { + return python::SWIGBridge::ToSWIGWrapper(std::move(arg)); } python::PythonObject Transform(const StructuredDataImpl &arg) { diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h b/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h index 5351c1a..97a3837 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h @@ -86,7 +86,7 @@ public: static PythonObject ToSWIGWrapper(lldb::ProcessSP process_sp); static PythonObject ToSWIGWrapper(lldb::ThreadPlanSP thread_plan_sp); static PythonObject ToSWIGWrapper(lldb::BreakpointSP breakpoint_sp); - static PythonObject ToSWIGWrapper(const Status &status); + static PythonObject ToSWIGWrapper(Status status); static PythonObject ToSWIGWrapper(const StructuredDataImpl &data_impl); static PythonObject ToSWIGWrapper(lldb::ThreadSP thread_sp); static PythonObject ToSWIGWrapper(lldb::StackFrameSP frame_sp); |