Example #1
0
 def new(module, force_interpreter=False):
     core.check_is_module(module)
     _util.check_is_unowned(module)
     ret = _core.LLVMCreateExecutionEngine(module.ptr, int(force_interpreter))
     if isinstance(ret, str):
         raise llvm.LLVMException(ret)
     return ExecutionEngine(ret, module)
Example #2
0
 def remove_module(self, module):
     core.check_is_module(module)
     if module.owner != self:
         raise llvm.LLVMException("module is not owned by self")
     ret = _core.LLVMRemoveModule2(self.ptr, module.ptr)
     if isinstance(ret, str):
         raise llvm.LLVMException(ret)
     return core.Module(ret)
Example #3
0
 def remove_module(self, module):
     core.check_is_module(module)
     if module.owner != self:
         raise llvm.LLVMException, "module is not owned by self"
     ret = _core.LLVMRemoveModule2(self.ptr, module.ptr)
     if isinstance(ret, str):
         raise llvm.LLVMException, ret
     return core.Module(ret)
Example #4
0
 def new(module, force_interpreter=False):
     core.check_is_module(module)
     _util.check_is_unowned(module)
     ret = _core.LLVMCreateExecutionEngine(module.ptr,
                                           int(force_interpreter))
     if isinstance(ret, str):
         raise llvm.LLVMException, ret
     return ExecutionEngine(ret, module)
Example #5
0
 def new(module):
     core.check_is_module(module)
     ptr = _core.LLVMCreateFunctionPassManagerForModule(module.ptr)
     return FunctionPassManager(ptr)
Example #6
0
 def run(self, module):
     core.check_is_module(module)
     return _core.LLVMRunPassManager(self.ptr, module.ptr)
Example #7
0
 def add_module(self, module):
     core.check_is_module(module)
     _core.LLVMAddModule(self.ptr, module.ptr)
     module._own(self)
Example #8
0
 def new(module):
     core.check_is_module(module)
     ptr = _core.LLVMCreateFunctionPassManagerForModule(module.ptr)
     return FunctionPassManager(ptr)
Example #9
0
 def run(self, module):
     core.check_is_module(module)
     return _core.LLVMRunPassManager(self.ptr, module.ptr)
Example #10
0
 def new(module):
     core.check_is_module(module)
     _util.check_is_unowned(module)
     obj = _core.LLVMCreateEngineBuilder(module.ptr)
     return EngineBuilder(obj, module)
Example #11
0
 def add_module(self, module):
     core.check_is_module(module)
     _core.LLVMAddModule(self.ptr, module.ptr)
     module._own(self)
Example #12
0
 def new(module):
     core.check_is_module(module)
     _util.check_is_unowned(module)
     obj = _core.LLVMCreateEngineBuilder(module.ptr)
     return EngineBuilder(obj, module)