@@ -1199,7 +1199,7 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
1199
1199
}
1200
1200
1201
1201
#[ cfg( feature="master" ) ]
1202
- fn cleanup_landing_pad ( & mut self , _ty : Type < ' gcc > , pers_fn : RValue < ' gcc > ) -> RValue < ' gcc > {
1202
+ fn cleanup_landing_pad ( & mut self , pers_fn : RValue < ' gcc > ) -> ( RValue < ' gcc > , RValue < ' gcc > ) {
1203
1203
self . set_personality_fn ( pers_fn) ;
1204
1204
1205
1205
// NOTE: insert the current block in a variable so that a later call to invoke knows to
@@ -1223,29 +1223,27 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
1223
1223
}
1224
1224
1225
1225
#[ cfg( not( feature="master" ) ) ]
1226
- fn cleanup_landing_pad ( & mut self , _ty : Type < ' gcc > , _pers_fn : RValue < ' gcc > ) -> RValue < ' gcc > {
1226
+ fn cleanup_landing_pad ( & mut self , _pers_fn : RValue < ' gcc > ) -> ( RValue < ' gcc > , RValue < ' gcc > ) {
1227
1227
let field1 = self . context . new_field ( None , self . u8_type . make_pointer ( ) , "landing_pad_field_1" ) ;
1228
1228
let field2 = self . context . new_field ( None , self . i32_type , "landing_pad_field_1" ) ;
1229
- let struct_type = self . context . new_struct_type ( None , "landing_pad" , & [ field1, field2] ) ;
1230
- self . current_func ( ) . new_local ( None , struct_type. as_type ( ) , "landing_pad" )
1231
- . to_rvalue ( )
1229
+ ( field1, field2)
1232
1230
}
1233
1231
1234
1232
#[ cfg( feature="master" ) ]
1235
- fn resume ( & mut self , exn : RValue < ' gcc > ) {
1233
+ fn resume ( & mut self , exn0 : RValue < ' gcc > , _exn1 : RValue < ' gcc > ) {
1236
1234
// TODO(antoyo): check if this is normal that we need to dereference the value.
1237
1235
// NOTE: the type is wrong, so in order to get a pointer for parameter, cast it to a
1238
1236
// pointer of pointer that is later dereferenced.
1239
- let exn_type = exn . get_type ( ) . make_pointer ( ) ;
1240
- let exn = self . context . new_cast ( None , exn , exn_type) ;
1237
+ let exn_type = exn0 . get_type ( ) . make_pointer ( ) ;
1238
+ let exn = self . context . new_cast ( None , exn0 , exn_type) ;
1241
1239
let exn = exn. dereference ( None ) . to_rvalue ( ) ;
1242
1240
let unwind_resume = self . context . get_target_builtin_function ( "__builtin_unwind_resume" ) ;
1243
1241
self . llbb ( ) . add_eval ( None , self . context . new_call ( None , unwind_resume, & [ exn] ) ) ;
1244
1242
self . unreachable ( ) ;
1245
1243
}
1246
1244
1247
1245
#[ cfg( not( feature="master" ) ) ]
1248
- fn resume ( & mut self , _exn : RValue < ' gcc > ) {
1246
+ fn resume ( & mut self , _exn0 : RValue < ' gcc > , _exn1 : RValue < ' gcc > ) {
1249
1247
self . unreachable ( ) ;
1250
1248
}
1251
1249
0 commit comments