@@ -170,7 +170,7 @@ impl StorageSlot for StylusTarget {
170170 . builder
171171 . build_int_to_ptr (
172172 bin. context . i32_type ( ) . const_all_ones ( ) ,
173- bin. context . i8_type ( ) . ptr_type ( AddressSpace :: default ( ) ) ,
173+ bin. context . ptr_type ( AddressSpace :: default ( ) ) ,
174174 "invalid" ,
175175 )
176176 . unwrap ( ) ;
@@ -309,12 +309,7 @@ impl StorageSlot for StylusTarget {
309309 let ret = self . get_storage_type_int ( bin, function, slot_ptr, ptr_ty, & storage_type) ;
310310
311311 bin. builder
312- . build_int_to_ptr (
313- ret,
314- bin. llvm_type ( ty. deref_any ( ) )
315- . ptr_type ( AddressSpace :: default ( ) ) ,
316- "" ,
317- )
312+ . build_int_to_ptr ( ret, bin. context . ptr_type ( AddressSpace :: default ( ) ) , "" )
318313 . unwrap ( )
319314 . into ( )
320315 }
@@ -400,8 +395,7 @@ impl StorageSlot for StylusTarget {
400395 if elem_ty. is_reference_type ( bin. ns )
401396 && !elem_ty. deref_memory ( ) . is_fixed_reference_type ( bin. ns )
402397 {
403- let load_ty =
404- bin. llvm_type ( elem_ty) . ptr_type ( AddressSpace :: default ( ) ) ;
398+ let load_ty = bin. context . ptr_type ( AddressSpace :: default ( ) ) ;
405399 elem = bin
406400 . builder
407401 . build_load ( load_ty, elem, "" )
@@ -619,7 +613,7 @@ impl StorageSlot for StylusTarget {
619613 if field. ty . is_reference_type ( bin. ns )
620614 && !field. ty . is_fixed_reference_type ( bin. ns )
621615 {
622- let load_ty = bin. llvm_type ( & field . ty ) . ptr_type ( AddressSpace :: default ( ) ) ;
616+ let load_ty = bin. context . ptr_type ( AddressSpace :: default ( ) ) ;
623617 elem = bin
624618 . builder
625619 . build_load ( load_ty, elem, field. name_as_str ( ) )
0 commit comments