@@ -114,7 +114,7 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
114
114
let after_block = func. new_block ( "after_while" ) ;
115
115
self . llbb ( ) . end_with_jump ( None , while_block) ;
116
116
117
- // NOTE: since jumps were added and compare_exchange doesn't expect this, the current blocks in the
117
+ // NOTE: since jumps were added and compare_exchange doesn't expect this, the current block in the
118
118
// state need to be updated.
119
119
self . switch_to_block ( while_block) ;
120
120
@@ -131,7 +131,7 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
131
131
132
132
while_block. end_with_conditional ( None , cond, while_block, after_block) ;
133
133
134
- // NOTE: since jumps were added in a place rustc does not expect, the current blocks in the
134
+ // NOTE: since jumps were added in a place rustc does not expect, the current block in the
135
135
// state need to be updated.
136
136
self . switch_to_block ( after_block) ;
137
137
@@ -906,6 +906,11 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
906
906
}
907
907
908
908
fn inttoptr ( & mut self , value : RValue < ' gcc > , dest_ty : Type < ' gcc > ) -> RValue < ' gcc > {
909
+ assert_eq ! (
910
+ value. get_type( ) ,
911
+ self . cx. type_isize( ) ,
912
+ "cg_ssa currently only calls this function with an isize argument" ,
913
+ ) ;
909
914
self . cx . const_bitcast ( value, dest_ty)
910
915
}
911
916
@@ -1007,7 +1012,7 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
1007
1012
else_block. add_assignment ( None , variable, else_val) ;
1008
1013
else_block. end_with_jump ( None , after_block) ;
1009
1014
1010
- // NOTE: since jumps were added in a place rustc does not expect, the current blocks in the
1015
+ // NOTE: since jumps were added in a place rustc does not expect, the current block in the
1011
1016
// state need to be updated.
1012
1017
self . switch_to_block ( after_block) ;
1013
1018
0 commit comments