changes to make llvmpy compatible with development branch of llvm

mostly just removing stuff and changing function prototypes.
with these changes, llvmpy compiles and llvm.test() passes.
This commit is contained in:
anthony cantor 2013-08-16 02:33:06 -06:00 • committed by Siu Kwan Lam
commit aa0ee9b6a6
8 changed files with 45 additions and 28 deletions

View file

@ -211,8 +211,10 @@ class CCEnum(Enum):
CC_X86_THISCALL = ID.X86_ThisCall
CC_PTX_KERNEL = ID.PTX_Kernel
CC_PTX_DEVICE = ID.PTX_Device
CC_MBLAZE_INTR = ID.MBLAZE_INTR
CC_MBLAZE_SVOL = ID.MBLAZE_SVOL
if llvm.version <= (3, 3):
CC_MBLAZE_INTR = ID.MBLAZE_INTR
CC_MBLAZE_SVOL = ID.MBLAZE_SVOL
CCEnum.declare()

View file

@ -120,13 +120,14 @@ class PassManagerBuilder(llvm.Wrapper):
def disable_unroll_loops(self, disable):
self._ptr.DisableUnrollLoops = disable
@property
def disable_simplify_lib_calls(self):
return self._ptr.DisableSimplifyLibCalls
if llvm.version <= (3, 3):
@property
def disable_simplify_lib_calls(self):
return self._ptr.DisableSimplifyLibCalls
@disable_simplify_lib_calls.setter
def disable_simplify_lib_calls(self, disable):
self._ptr.DisableSimplifyLibCalls = disable
@disable_simplify_lib_calls.setter
def disable_simplify_lib_calls(self, disable):
self._ptr.DisableSimplifyLibCalls = disable
def use_inliner_with_threshold(self, threshold):
self._ptr.Inliner = api.llvm.createFunctionInliningPass(threshold)

View file

@ -393,7 +393,8 @@ entry:
# make sure the default is False
self.assertFalse(pmb.disable_unit_at_a_time)
self.assertFalse(pmb.disable_unroll_loops)
self.assertFalse(pmb.disable_simplify_lib_calls)
if llvm.version <= (3, 3):
self.assertFalse(pmb.disable_simplify_lib_calls)
pmb.disable_unit_at_a_time = True
self.assertTrue(pmb.disable_unit_at_a_time)