B
    Ꮚ\*                 @   sl   d dl mZ ddlmZ dd Zdd Zdd	 Zd
d Zdd Zdd Z	dd Z
eejj_dd Ze ZdS )    )c_uint   )ffic               C   s   t j  dS )z#
    Initialize the LLVM core.
    N)r   libZLLVMPY_InitializeCore r   r   8lib/python3.7/site-packages/llvmlite/binding/initfini.py
initialize   s    r   c               C   s"   t j  t j  t j  dS )zn
    Initialize all targets. Necessary before targets can be looked up
    via the :class:`Target` class.
    N)r   r   ZLLVMPY_InitializeAllTargetInfosZLLVMPY_InitializeAllTargetsZLLVMPY_InitializeAllTargetMCsr   r   r   r   initialize_all_targets   s    

r	   c               C   s   t j  dS )z
    Initialize all code generators. Necessary before generating
    any assembly or machine code via the :meth:`TargetMachine.emit_object`
    and :meth:`TargetMachine.emit_assembly` methods.
    N)r   r   ZLLVMPY_InitializeAllAsmPrintersr   r   r   r   initialize_all_asmprinters   s    r
   c               C   s   t j  dS )z_
    Initialize the native (host) target.  Necessary before doing any
    code generation.
    N)r   r   ZLLVMPY_InitializeNativeTargetr   r   r   r   initialize_native_target   s    r   c               C   s   t j  dS )z,
    Initialize the native ASM printer.
    N)r   r   Z!LLVMPY_InitializeNativeAsmPrinterr   r   r   r   initialize_native_asmprinter'   s    r   c               C   s   t j  dS )z+
    Initialize the native ASM parser.
    N)r   r   Z LLVMPY_InitializeNativeAsmParserr   r   r   r   initialize_native_asmparser.   s    r   c               C   s   t j  d S )N)r   r   ZLLVMPY_Shutdownr   r   r   r   shutdown5   s    r   c              C   s:   g } t j }x|r,| |d@  |dL }qW tt| S )N      )r   r   LLVMPY_GetVersionInfoappendtuplereversed)vxr   r   r   _version_info?   s    
r   N)Zctypesr    r   r   r	   r
   r   r   r   r   r   r   Zrestyper   Zllvm_version_infor   r   r   r   <module>   s   		
