forked from M-Labs/artiq
1
0
Fork 0

Verify LLVM module in compiler.textbench.jit.

This commit is contained in:
whitequark 2015-07-23 07:57:35 +03:00
parent 9db199cad9
commit 2b9ac344d8
1 changed files with 1 additions and 0 deletions

View File

@ -23,6 +23,7 @@ def main():
lltarget = llvm.Target.from_default_triple() lltarget = llvm.Target.from_default_triple()
llmachine = lltarget.create_target_machine() llmachine = lltarget.create_target_machine()
llparsedmod = llvm.parse_assembly(str(llmod)) llparsedmod = llvm.parse_assembly(str(llmod))
llparsedmod.verify()
lljit = llvm.create_mcjit_compiler(llparsedmod, llmachine) lljit = llvm.create_mcjit_compiler(llparsedmod, llmachine)
lljit.finalize_object() lljit.finalize_object()
llmain = lljit.get_pointer_to_global(llparsedmod.get_function(llmod.name + ".__modinit__")) llmain = lljit.get_pointer_to_global(llparsedmod.get_function(llmod.name + ".__modinit__"))