summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/Python
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-03-17 03:32:21 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-03-17 03:32:21 +0000
commit3dfb86b641a3d3d9cb2149d1892abe06b4e453c5 (patch)
treebf41a253c91835232d00c198bb93c4dd4731a061 /lldb/scripts/Python
parentbaf1aaaf1fb7fe2f543ffe2515641dd2f5c9d635 (diff)
downloadbcm5719-llvm-3dfb86b641a3d3d9cb2149d1892abe06b4e453c5.tar.gz
bcm5719-llvm-3dfb86b641a3d3d9cb2149d1892abe06b4e453c5.zip
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
Diffstat (limited to 'lldb/scripts/Python')
-rw-r--r--lldb/scripts/Python/python-wrapper.swig26
1 files changed, 10 insertions, 16 deletions
diff --git a/lldb/scripts/Python/python-wrapper.swig b/lldb/scripts/Python/python-wrapper.swig
index 10bbf1be55b..af8ea65db89 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*
OpenPOWER on IntegriCloud