@@ -583,7 +583,7 @@ fn codegen_regular_intrinsic_call<'tcx>(
583
583
intrinsic_args ! ( fx, args => ( base, offset) ; intrinsic) ;
584
584
let offset = offset. load_scalar ( fx) ;
585
585
586
- let pointee_ty = base. layout ( ) . ty . builtin_deref ( true ) . unwrap ( ) ;
586
+ let pointee_ty = base. layout ( ) . ty . builtin_deref ( true , fx . tcx ) . unwrap ( ) ;
587
587
let pointee_size = fx. layout_of ( pointee_ty) . size . bytes ( ) ;
588
588
let ptr_diff = if pointee_size != 1 {
589
589
fx. bcx . ins ( ) . imul_imm ( offset, pointee_size as i64 )
@@ -609,7 +609,7 @@ fn codegen_regular_intrinsic_call<'tcx>(
609
609
let val = val. load_scalar ( fx) ;
610
610
let count = count. load_scalar ( fx) ;
611
611
612
- let pointee_ty = dst. layout ( ) . ty . builtin_deref ( true ) . unwrap ( ) ;
612
+ let pointee_ty = dst. layout ( ) . ty . builtin_deref ( true , fx . tcx ) . unwrap ( ) ;
613
613
let pointee_size = fx. layout_of ( pointee_ty) . size . bytes ( ) ;
614
614
let count = if pointee_size != 1 {
615
615
fx. bcx . ins ( ) . imul_imm ( count, pointee_size as i64 )
@@ -717,7 +717,7 @@ fn codegen_regular_intrinsic_call<'tcx>(
717
717
718
718
// Cranelift treats loads as volatile by default
719
719
// FIXME correctly handle unaligned_volatile_load
720
- let inner_layout = fx. layout_of ( ptr. layout ( ) . ty . builtin_deref ( true ) . unwrap ( ) ) ;
720
+ let inner_layout = fx. layout_of ( ptr. layout ( ) . ty . builtin_deref ( true , fx . tcx ) . unwrap ( ) ) ;
721
721
let val = CValue :: by_ref ( Pointer :: new ( ptr. load_scalar ( fx) ) , inner_layout) ;
722
722
ret. write_cvalue ( fx, val) ;
723
723
}
0 commit comments