use opaque pointer types everywhere

Signed-off-by: xermicus <cyrill@parity.io>
This commit is contained in:
xermicus
2024-04-15 16:02:38 +02:00
parent 7aa27516e4
commit d6ae7daab1
7 changed files with 26 additions and 44 deletions
@@ -186,8 +186,7 @@ impl<'ctx> LLVMRuntime<'ctx> {
Self::FUNCTION_CXA_THROW,
llvm.void_type().fn_type(
vec![
llvm.i8_type()
.ptr_type(AddressSpace::Stack.into())
llvm.ptr_type(AddressSpace::Stack.into())
.as_basic_type_enum()
.into();
3
@@ -432,8 +431,7 @@ impl<'ctx> LLVMRuntime<'ctx> {
Self::FUNCTION_MSTORE8,
llvm.void_type().fn_type(
vec![
llvm.custom_width_int_type(revive_common::BIT_LENGTH_BYTE as u32)
.ptr_type(AddressSpace::Heap.into())
llvm.ptr_type(AddressSpace::Heap.into())
.as_basic_type_enum()
.into(),
llvm.custom_width_int_type(revive_common::BIT_LENGTH_FIELD as u32)
@@ -463,8 +461,7 @@ impl<'ctx> LLVMRuntime<'ctx> {
llvm.custom_width_int_type(revive_common::BIT_LENGTH_FIELD as u32)
.fn_type(
vec![
llvm.custom_width_int_type(revive_common::BIT_LENGTH_BYTE as u32)
.ptr_type(AddressSpace::Heap.into())
llvm.ptr_type(AddressSpace::Heap.into())
.as_basic_type_enum()
.into(),
llvm.custom_width_int_type(revive_common::BIT_LENGTH_FIELD as u32)
@@ -503,8 +500,7 @@ impl<'ctx> LLVMRuntime<'ctx> {
llvm.custom_width_int_type(revive_common::BIT_LENGTH_FIELD as u32)
.as_basic_type_enum()
.into(),
llvm.custom_width_int_type(revive_common::BIT_LENGTH_FIELD as u32)
.ptr_type(AddressSpace::Stack.into())
llvm.ptr_type(AddressSpace::Stack.into())
.as_basic_type_enum()
.into(),
]
@@ -537,8 +533,7 @@ impl<'ctx> LLVMRuntime<'ctx> {
);
let mut external_call_arguments_by_ref: Vec<inkwell::types::BasicMetadataTypeEnum> = vec![
llvm.custom_width_int_type(revive_common::BIT_LENGTH_BYTE as u32)
.ptr_type(AddressSpace::Generic.into())
llvm.ptr_type(AddressSpace::Generic.into())
.as_basic_type_enum()
.into(),
llvm.custom_width_int_type(revive_common::BIT_LENGTH_FIELD as u32)
@@ -563,8 +558,7 @@ impl<'ctx> LLVMRuntime<'ctx> {
let external_call_result_type = llvm
.struct_type(
&[
llvm.custom_width_int_type(revive_common::BIT_LENGTH_BYTE as u32)
.ptr_type(AddressSpace::Generic.into())
llvm.ptr_type(AddressSpace::Generic.into())
.as_basic_type_enum(),
llvm.bool_type().as_basic_type_enum(),
],