@@ -114,7 +114,7 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
114114 let after_block = func. new_block ( "after_while" ) ;
115115 self . llbb ( ) . end_with_jump ( None , while_block) ;
116116
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
118118 // state need to be updated.
119119 self . switch_to_block ( while_block) ;
120120
@@ -131,7 +131,7 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
131131
132132 while_block. end_with_conditional ( None , cond, while_block, after_block) ;
133133
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
135135 // state need to be updated.
136136 self . switch_to_block ( after_block) ;
137137
@@ -906,6 +906,11 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
906906 }
907907
908908 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+ ) ;
909914 self . cx . const_bitcast ( value, dest_ty)
910915 }
911916
@@ -1007,7 +1012,7 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
10071012 else_block. add_assignment ( None , variable, else_val) ;
10081013 else_block. end_with_jump ( None , after_block) ;
10091014
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
10111016 // state need to be updated.
10121017 self . switch_to_block ( after_block) ;
10131018
0 commit comments