From 3dfb86b641a3d3d9cb2149d1892abe06b4e453c5 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Tue, 17 Mar 2015 03:32:21 +0000 Subject: Fix the clang -Werror build & make the unit tests link under Linux The order of libraries passed to the linker didn't work under linux (you need the llvm libraries first, then the lldb libraries). I modelled this after clang's setup here. Seemed simple enough to just be consistent. llvm-svn: 232461 --- lldb/scripts/Python/python-wrapper.swig | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'lldb/scripts/Python') diff --git a/lldb/scripts/Python/python-wrapper.swig b/lldb/scripts/Python/python-wrapper.swig index 10bbf1b..af8ea65 100644 --- a/lldb/scripts/Python/python-wrapper.swig +++ b/lldb/scripts/Python/python-wrapper.swig @@ -919,28 +919,22 @@ LLDBSwigPythonCallCommandObject lldb::SBDebugger debugger_sb(debugger); lldb::SBExecutionContext exe_ctx_sb(exe_ctx_ref_sp); - bool retval = false; - - { - PyErr_Cleaner py_err_cleaner(true); - - PyCallable pfunc = PyCallable::FindWithMemberFunction(implementor,"__call__"); + PyErr_Cleaner py_err_cleaner(true); - if (!pfunc) - return NULL; + PyCallable pfunc = PyCallable::FindWithMemberFunction(implementor,"__call__"); - // pass the pointer-to cmd_retobj_sb or watch the underlying object disappear from under you - // see comment above for SBCommandReturnObjectReleaser for further details - PyObject* pvalue = NULL; + if (!pfunc) + return false; - pvalue = pfunc(debugger_sb, args, exe_ctx_sb, &cmd_retobj_sb); + // pass the pointer-to cmd_retobj_sb or watch the underlying object disappear from under you + // see comment above for SBCommandReturnObjectReleaser for further details + PyObject* pvalue = NULL; - Py_XDECREF (pvalue); + pvalue = pfunc(debugger_sb, args, exe_ctx_sb, &cmd_retobj_sb); - retval = true; - } + Py_XDECREF (pvalue); - return retval; + return true; } SWIGEXPORT void* -- cgit v1.1