mib updated this revision to Diff 484527. mib marked an inline comment as done. mib added a comment.
Use `std::forward` CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139248/new/ https://reviews.llvm.org/D139248 Files: lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.cpp lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h Index: lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h =================================================================== --- lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h +++ lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h @@ -99,7 +99,13 @@ return ExtractValueFromPythonObject<T>(py_return, error); } - Status GetStatusFromMethod(llvm::StringRef method_name); + template <typename... Args> + Status GetStatusFromMethod(llvm::StringRef method_name, Args &&...args) { + Status error; + Dispatch<Status>(method_name, error, std::forward<Args>(args)...); + + return error; + } template <typename T> T Transform(T object) { // No Transformation for generic usage Index: lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.cpp =================================================================== --- lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.cpp +++ lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.cpp @@ -26,14 +26,6 @@ ScriptInterpreterPythonImpl &interpreter) : ScriptedInterface(), m_interpreter(interpreter) {} -Status -ScriptedPythonInterface::GetStatusFromMethod(llvm::StringRef method_name) { - Status error; - Dispatch<Status>(method_name, error); - - return error; -} - template <> StructuredData::ArraySP ScriptedPythonInterface::ExtractValueFromPythonObject<StructuredData::ArraySP>(
Index: lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h =================================================================== --- lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h +++ lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h @@ -99,7 +99,13 @@ return ExtractValueFromPythonObject<T>(py_return, error); } - Status GetStatusFromMethod(llvm::StringRef method_name); + template <typename... Args> + Status GetStatusFromMethod(llvm::StringRef method_name, Args &&...args) { + Status error; + Dispatch<Status>(method_name, error, std::forward<Args>(args)...); + + return error; + } template <typename T> T Transform(T object) { // No Transformation for generic usage Index: lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.cpp =================================================================== --- lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.cpp +++ lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.cpp @@ -26,14 +26,6 @@ ScriptInterpreterPythonImpl &interpreter) : ScriptedInterface(), m_interpreter(interpreter) {} -Status -ScriptedPythonInterface::GetStatusFromMethod(llvm::StringRef method_name) { - Status error; - Dispatch<Status>(method_name, error); - - return error; -} - template <> StructuredData::ArraySP ScriptedPythonInterface::ExtractValueFromPythonObject<StructuredData::ArraySP>(
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits