diff --git a/llvm/_core.c b/llvm/_core.c index 61c34e0..55a64f3 100644 --- a/llvm/_core.c +++ b/llvm/_core.c @@ -856,11 +856,11 @@ _wrap_obj2none(LLVMDisposePassManager, LLVMPassManagerRef) _wrap_none2str(LLVMDumpPasses) _wrap_objstr2obj(LLVMAddPassByName, LLVMPassManagerRef, int) -static PyObject * +static PyObject * _wLLVMInitializePasses(PyObject * self, PyObject * args) { - if (!PyArg_ParseTuple(args, "")) - return NULL; + if (!PyArg_ParseTuple(args, "")) + return NULL; LLVMInitializePasses(); Py_RETURN_NONE; } @@ -869,7 +869,7 @@ _wLLVMInitializePasses(PyObject * self, PyObject * args) /*===----------------------------------------------------------------------===*/ /* Passes */ /*===----------------------------------------------------------------------===*/ - +/* #define _wrap_pass(P) \ _wrap_obj2none( LLVMAdd ## P ## Pass, LLVMPassManagerRef) @@ -958,7 +958,7 @@ _wrap_pass( TailCallElimination ) _wrap_pass( UnifyFunctionExitNodes ) _wrap_pass( Internalize2 ) - +*/ /*===----------------------------------------------------------------------===*/ /* Target Data */ /*===----------------------------------------------------------------------===*/ @@ -1701,7 +1701,7 @@ static PyMethodDef core_methods[] = { /* Passes */ - + /* _pass( AAEval ) _pass( AggressiveDCE ) _pass( AliasAnalysisCounter ) @@ -1786,6 +1786,7 @@ static PyMethodDef core_methods[] = { _pass( UnifyFunctionExitNodes ) _pass( Internalize2 ) + */ /* Target Data */ _method( LLVMCreateTargetData ) diff --git a/llvm/extra.cpp b/llvm/extra.cpp index 8e6ec83..876921b 100644 --- a/llvm/extra.cpp +++ b/llvm/extra.cpp @@ -585,10 +585,11 @@ unsigned LLVMGetParamAlignment(LLVMValueRef arg) return argp->getParent()->getParamAlignment(argno + 1); } + /* Passes. A few passes (listed below) are used directly from LLVM-C, * rest are defined here. */ - +/* #define define_pass(P) \ void LLVMAdd ## P ## Pass (LLVMPassManagerRef passmgr) { \ using namespace llvm; \ @@ -646,8 +647,9 @@ define_pass( StripNonDebugSymbols ) //define_pass( StructRetPromotion ) //define_pass( TailDuplication ) define_pass( UnifyFunctionExitNodes ) - +*/ /* we support only internalize(true) */ +/* llvm::ModulePass *createInternalize2Pass() { return llvm::createInternalizePass(true); } define_pass( Internalize2 ) - +*/ diff --git a/llvm/extra.h b/llvm/extra.h index a77e54b..bd6a264 100644 --- a/llvm/extra.h +++ b/llvm/extra.h @@ -238,6 +238,7 @@ unsigned LLVMGetParamAlignment(LLVMValueRef arg); /* Passes. Some passes are used directly from LLVM-C, rest are declared * here. */ +/* #define declare_pass(P) \ void LLVMAdd ## P ## Pass (LLVMPassManagerRef PM); @@ -292,6 +293,7 @@ declare_pass( TailDuplication ) declare_pass( UnifyFunctionExitNodes ) declare_pass( Internalize2 ) +*/ #ifdef __cplusplus } /* extern "C" */