4.1. Initialization and finalization¶
These functions need only be called once per process invocation.
-
llvmlite.binding.
initialize
()¶ Initialize the LLVM core.
-
llvmlite.binding.
initialize_all_targets
()¶ Initialize all targets. Necessary before targets can be looked up via the
Target
class.
-
llvmlite.binding.
initialize_all_asmprinters
()¶ Initialize all code generators. Necessary before generating any assembly or machine code via the
TargetMachine.emit_object()
andTargetMachine.emit_assembly()
methods.
-
llvmlite.binding.
initialize_native_target
()¶ Initialize the native (host) target. Calling this function once is necessary before doing any code generation.
-
llvmlite.binding.
initialize_native_asmprinter
()¶ Initialize the native assembly printer.
-
llvmlite.binding.
initialize_native_asmparser
()¶ Initialize the native assembly parser. This is necessary for inline assembly to work.
-
llvmlite.binding.
shutdown
()¶ Shutdown the LLVM core.
-
llvmlite.binding.
llvm_version_info
¶ A three-integer tuple representing the LLVM version number, for example
(3, 7, 1)
. Since LLVM is statically linked into thellvmlite
DLL, this is guaranteed to represent the true LLVM version in use.