Removed the deprecated ModuleProvider class

git-svn-id: http://llvm-py.googlecode.com/svn/trunk@88 8d1e9007-1d4e-0410-b67e-1979fd6579aa
This commit is contained in:
mdevan.foobar 2010-07-26 16:36:02 +00:00
commit b7200e59b1
11 changed files with 87 additions and 152 deletions

View file

@ -1,5 +1,5 @@
#
# Copyright (c) 2008, Mahadevan R All rights reserved.
# Copyright (c) 2008-10, Mahadevan R All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
@ -37,7 +37,7 @@ are available.
import llvm # top-level, for common stuff
import llvm.ee as ee # target data
import llvm.core as core # module provider, function etc.
import llvm.core as core # module, function etc.
import llvm._core as _core # C wrappers
@ -271,9 +271,10 @@ class PassManager(object):
class FunctionPassManager(PassManager):
@staticmethod
def new(mp):
core.check_is_module_provider(mp)
return FunctionPassManager(_core.LLVMCreateFunctionPassManager(mp.ptr))
def new(module):
core.check_is_module(module)
ptr = _core.LLVMCreateFunctionPassManagerForModule(module.ptr)
return FunctionPassManager(ptr)
def __init__(self, ptr):
PassManager.__init__(self, ptr)