Fix LLVMLinkModules for LLVM-3.1

This commit is contained in:
Siu Kwan Lam 2013-01-17 18:59:20 -06:00
commit 206d512c10
3 changed files with 14 additions and 21 deletions

View file

@ -278,8 +278,8 @@ _wLLVMLinkModules(PyObject *self, PyObject *args)
const LLVMModuleRef dest = pycap_get<LLVMModuleRef>(dest_obj ) ;
const LLVMModuleRef src = pycap_get<LLVMModuleRef>(src_obj) ;
PyObject *ret;
char *errmsg;
PyObject *ret = NULL;
char *errmsg = NULL;
if (LLVMLinkModules(dest, src, (LLVMLinkerMode)mode, &errmsg)) {
if (errmsg) {
ret = PyUnicode_FromString(errmsg);