@@ -239,7 +239,8 @@ fn codegen_fn_content(fx: &mut FunctionCx<'_, '_, '_>) {
239
239
fx. add_comment ( inst, terminator_head) ;
240
240
}
241
241
242
- fx. set_debug_loc ( bb_data. terminator ( ) . source_info ) ;
242
+ let source_info = bb_data. terminator ( ) . source_info ;
243
+ fx. set_debug_loc ( source_info) ;
243
244
244
245
match & bb_data. terminator ( ) . kind {
245
246
TerminatorKind :: Goto { target } => {
@@ -295,19 +296,19 @@ fn codegen_fn_content(fx: &mut FunctionCx<'_, '_, '_>) {
295
296
let len = codegen_operand ( fx, len) . load_scalar ( fx) ;
296
297
let index = codegen_operand ( fx, index) . load_scalar ( fx) ;
297
298
let location = fx
298
- . get_caller_location ( bb_data . terminator ( ) . source_info . span )
299
+ . get_caller_location ( source_info. span )
299
300
. load_scalar ( fx) ;
300
301
301
302
codegen_panic_inner (
302
303
fx,
303
304
rustc_hir:: LangItem :: PanicBoundsCheck ,
304
305
& [ index, len, location] ,
305
- bb_data . terminator ( ) . source_info . span ,
306
+ source_info. span ,
306
307
) ;
307
308
}
308
309
_ => {
309
310
let msg_str = msg. description ( ) ;
310
- codegen_panic ( fx, msg_str, bb_data . terminator ( ) . source_info . span ) ;
311
+ codegen_panic ( fx, msg_str, source_info. span ) ;
311
312
}
312
313
}
313
314
}
@@ -378,10 +379,18 @@ fn codegen_fn_content(fx: &mut FunctionCx<'_, '_, '_>) {
378
379
options,
379
380
destination,
380
381
line_spans : _,
382
+ cleanup,
381
383
} => {
384
+ if cleanup. is_some ( ) {
385
+ fx. tcx . sess . span_fatal (
386
+ source_info. span ,
387
+ "cranelift doesn't support unwinding from inline assembly." ,
388
+ ) ;
389
+ }
390
+
382
391
crate :: inline_asm:: codegen_inline_asm (
383
392
fx,
384
- bb_data . terminator ( ) . source_info . span ,
393
+ source_info. span ,
385
394
template,
386
395
operands,
387
396
* options,
@@ -415,7 +424,7 @@ fn codegen_fn_content(fx: &mut FunctionCx<'_, '_, '_>) {
415
424
}
416
425
TerminatorKind :: Drop { place, target, unwind : _ } => {
417
426
let drop_place = codegen_place ( fx, * place) ;
418
- crate :: abi:: codegen_drop ( fx, bb_data . terminator ( ) . source_info . span , drop_place) ;
427
+ crate :: abi:: codegen_drop ( fx, source_info. span , drop_place) ;
419
428
420
429
let target_block = fx. get_block ( * target) ;
421
430
fx. bcx . ins ( ) . jump ( target_block, & [ ] ) ;
0 commit comments