File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -767,7 +767,10 @@ fn codegen_stmt<'tcx>(
767
767
NullOp :: SizeOf => layout. size . bytes ( ) ,
768
768
NullOp :: AlignOf => layout. align . abi . bytes ( ) ,
769
769
} ;
770
- let val = CValue :: const_val ( fx, fx. layout_of ( fx. tcx . types . usize ) , val. into ( ) ) ;
770
+ let val = CValue :: by_val (
771
+ fx. bcx . ins ( ) . iconst ( fx. pointer_type , i64:: try_from ( val) . unwrap ( ) ) ,
772
+ fx. layout_of ( fx. tcx . types . usize ) ,
773
+ ) ;
771
774
lval. write_cvalue ( fx, val) ;
772
775
}
773
776
Rvalue :: Aggregate ( ref kind, ref operands) => {
Original file line number Diff line number Diff line change @@ -1103,8 +1103,8 @@ fn codegen_regular_intrinsic_call<'tcx>(
1103
1103
1104
1104
fx. bcx . ins ( ) . call_indirect ( f_sig, f, & [ data] ) ;
1105
1105
1106
- let layout = ret . layout ( ) ;
1107
- let ret_val = CValue :: const_val ( fx, layout , ty :: ScalarInt :: null ( layout. size ) ) ;
1106
+ let layout = fx . layout_of ( fx . tcx . types . i32 ) ;
1107
+ let ret_val = CValue :: by_val ( fx. bcx . ins ( ) . iconst ( types :: I32 , 0 ) , layout) ;
1108
1108
ret. write_cvalue ( fx, ret_val) ;
1109
1109
}
1110
1110
You can’t perform that action at this time.
0 commit comments