from . import TestCase as TestCase
from llvmlite import ir as ir
from typing import Any, Optional

int1: Any
int8: Any
int16: Any
int32: Any
int64: Any
hlf: Any
flt: Any
dbl: Any
PY2: Any

class TestBase(TestCase):
    def assertInText(self, pattern: Any, text: Any): ...
    def assert_ir_line(self, line: Any, mod: Any) -> None: ...
    def assert_valid_ir(self, mod: Any) -> None: ...
    def assert_pickle_correctly(self, irobject: Any): ...
    def module(self): ...
    def function(self, module: Optional[Any] = ..., name: str = ...): ...
    def block(self, func: Optional[Any] = ..., name: str = ...): ...
    def descr(self, thing: Any): ...
    def check_descr(self, descr: Any, asm: Any) -> None: ...
    def check_block(self, block: Any, asm: Any) -> None: ...
    def check_module_body(self, module: Any, asm: Any) -> None: ...
    def check_metadata(self, module: Any, asm: Any) -> None: ...
    def check_func_body(self, func: Any, asm: Any) -> None: ...

class TestFunction(TestBase):
    proto: str = ...
    def test_declare(self) -> None: ...
    def test_declare_attributes(self) -> None: ...
    def test_function_attributes(self) -> None: ...
    def test_function_metadata(self) -> None: ...
    def test_define(self) -> None: ...
    def test_declare_intrinsics(self) -> None: ...
    def test_redeclare_intrinsic(self) -> None: ...
    def test_pickling(self) -> None: ...

class TestIR(TestBase):
    def test_unnamed_metadata(self) -> None: ...
    def test_unnamed_metadata_2(self) -> None: ...
    def test_unnamed_metadata_3(self) -> None: ...
    def test_metadata_string(self) -> None: ...
    def test_named_metadata(self) -> None: ...
    def test_named_metadata_2(self) -> None: ...
    def test_metadata_null(self) -> None: ...
    def test_debug_info(self) -> None: ...
    def test_debug_info_2(self) -> None: ...
    def test_debug_info_py2_long(self) -> None: ...
    def test_inline_assembly(self) -> None: ...
    def test_builder_asm(self) -> None: ...
    def test_builder_load_reg(self) -> None: ...
    def test_builder_store_reg(self) -> None: ...

class TestGlobalValues(TestBase):
    def test_globals_access(self) -> None: ...
    def test_functions_global_values_access(self) -> None: ...
    def test_global_variables_ir(self) -> None: ...
    def test_pickle(self) -> None: ...

class TestBlock(TestBase):
    def test_attributes(self) -> None: ...
    def test_descr(self) -> None: ...
    def test_replace(self) -> None: ...
    def test_repr(self) -> None: ...

class TestBuildInstructions(TestBase):
    maxDiff: int = ...
    def test_simple(self) -> None: ...
    def test_binops(self) -> None: ...
    def test_binop_flags(self) -> None: ...
    def test_binop_fastmath_flags(self) -> None: ...
    def test_binops_with_overflow(self) -> None: ...
    def test_unary_ops(self) -> None: ...
    def test_replace_operand(self) -> None: ...
    def test_integer_comparisons(self) -> None: ...
    def test_float_comparisons(self) -> None: ...
    def test_misc_ops(self) -> None: ...
    def test_phi(self) -> None: ...
    def test_mem_ops(self) -> None: ...
    def test_gep(self) -> None: ...
    def test_gep_castinstr(self) -> None: ...
    def test_gep_castinstr_addrspace(self) -> None: ...
    def test_gep_addrspace(self) -> None: ...
    def test_extract_insert_value(self) -> None: ...
    def test_cast_ops(self) -> None: ...
    def test_atomicrmw(self) -> None: ...
    def test_branch(self) -> None: ...
    def test_cbranch(self) -> None: ...
    def test_cbranch_weights(self) -> None: ...
    def test_branch_indirect(self) -> None: ...
    def test_returns(self) -> None: ...
    def test_switch(self) -> None: ...
    def test_call(self) -> None: ...
    def test_call_metadata(self) -> None: ...
    def test_invoke(self) -> None: ...
    def test_landingpad(self) -> None: ...
    def test_assume(self) -> None: ...
    def test_vector_ops(self) -> None: ...
    def test_bitreverse(self) -> None: ...
    def test_bitreverse_wrongtype(self) -> None: ...
    def test_fence(self) -> None: ...
    def test_bswap(self) -> None: ...
    def test_ctpop(self) -> None: ...
    def test_ctlz(self) -> None: ...
    def test_convert_to_fp16_f32(self) -> None: ...
    def test_convert_to_fp16_f32_wrongtype(self) -> None: ...
    def test_convert_from_fp16_f32(self) -> None: ...
    def test_convert_from_fp16_f32_notype(self) -> None: ...
    def test_convert_from_fp16_f32_wrongtype(self) -> None: ...
    def test_convert_from_fp16_f32_wrongtype2(self) -> None: ...
    def test_cttz(self) -> None: ...
    def test_cttz_wrongflag(self) -> None: ...
    def test_cttz_wrongtype(self) -> None: ...
    def test_fma(self) -> None: ...
    def test_fma_wrongtype(self) -> None: ...
    def test_fma_mixedtypes(self) -> None: ...

class TestBuilderMisc(TestBase):
    def test_attributes(self) -> None: ...
    def test_goto_block(self) -> None: ...
    def test_if_then(self) -> None: ...
    def test_if_then_nested(self) -> None: ...
    def test_if_then_long_label(self) -> None: ...
    def test_if_then_likely(self): ...
    def test_if_else(self) -> None: ...
    def test_if_else_likely(self): ...
    def test_positioning(self) -> None: ...
    def test_metadata(self) -> None: ...

class TestTypes(TestBase):
    def has_logical_equality(self, ty: Any): ...
    def assorted_types(self): ...
    def test_pickling(self) -> None: ...
    def test_comparisons(self) -> None: ...
    def test_str(self) -> None: ...
    def test_hash(self) -> None: ...
    def test_gep(self) -> None: ...
    def test_abi_size(self) -> None: ...
    def test_abi_alignment(self) -> None: ...
    def test_identified_struct(self) -> None: ...
    def test_target_data_non_default_context(self) -> None: ...
    def test_vector(self) -> None: ...

c32: Any

class TestConstant(TestBase):
    def test_integers(self) -> None: ...
    def test_reals(self) -> None: ...
    def test_arrays(self) -> None: ...
    def test_vector(self) -> None: ...
    def test_structs(self) -> None: ...
    def test_undefined_literal_struct_pickling(self) -> None: ...
    def test_type_instantiaton(self) -> None: ...
    def test_repr(self) -> None: ...
    def test_encoding_problem(self) -> None: ...
    def test_gep(self) -> None: ...
    def test_gep_addrspace_globalvar(self) -> None: ...
    def test_bitcast(self) -> None: ...
    def test_inttoptr(self) -> None: ...

class TestTransforms(TestBase):
    def test_call_transform(self) -> None: ...

class TestSingleton(TestBase):
    def test_undefined(self) -> None: ...
