from ..six import PY2 as PY2
from ..utils import get_library_name as get_library_name
from typing import Any, Optional

LLVMContextRef: Any
LLVMModuleRef: Any
LLVMValueRef: Any
LLVMTypeRef: Any
LLVMExecutionEngineRef: Any
LLVMPassManagerBuilderRef: Any
LLVMPassManagerRef: Any
LLVMTargetDataRef: Any
LLVMTargetLibraryInfoRef: Any
LLVMTargetRef: Any
LLVMTargetMachineRef: Any
LLVMMemoryBufferRef: Any
LLVMAttributeListIterator: Any
LLVMAttributeSetIterator: Any
LLVMGlobalsIterator: Any
LLVMFunctionsIterator: Any
LLVMBlocksIterator: Any
LLVMArgumentsIterator: Any
LLVMInstructionsIterator: Any
LLVMOperandsIterator: Any
LLVMTypesIterator: Any
LLVMObjectCacheRef: Any
LLVMObjectFileRef: Any
LLVMSectionIteratorRef: Any

class _lib_wrapper:
    def __init__(self, lib: Any) -> None: ...
    def __getattr__(self, name: Any): ...

class _lib_fn_wrapper:
    def __init__(self, lock: Any, cfn: Any) -> None: ...
    @property
    def argtypes(self): ...
    @argtypes.setter
    def argtypes(self, argtypes: Any) -> None: ...
    @property
    def restype(self): ...
    @restype.setter
    def restype(self, restype: Any) -> None: ...
    def __call__(self, *args: Any, **kwargs: Any): ...

lib: Any

class _DeadPointer: ...

class OutputString:
    @classmethod
    def from_return(cls, ptr: Any): ...
    def __init__(self, owned: bool = ..., init: Optional[Any] = ...) -> None: ...
    def close(self) -> None: ...
    def __enter__(self): ...
    def __exit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> None: ...
    def __del__(self, _is_shutting_down: Any = ...) -> None: ...
    def __bool__(self): ...
    __nonzero__: Any = ...
    @property
    def bytes(self): ...

def ret_string(ptr: Any): ...
def ret_bytes(ptr: Any): ...

class ObjectRef:
    def __init__(self, ptr: Any) -> None: ...
    def close(self) -> None: ...
    def detach(self) -> None: ...
    @property
    def closed(self): ...
    def __enter__(self): ...
    def __exit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) -> None: ...
    def __del__(self, _is_shutting_down: Any = ...) -> None: ...
    def __bool__(self): ...
    def __eq__(self, other: Any) -> Any: ...
    __nonzero__: Any = ...
    def __hash__(self) -> Any: ...
