@@ -358,8 +358,7 @@ impl<'tcx> TerminatorKind<'tcx> {
358358 | Yield { resume : ref t, drop : Some ( u) , .. }
359359 | Drop { target : ref t, unwind : UnwindAction :: Cleanup ( u) , .. }
360360 | Assert { target : ref t, unwind : UnwindAction :: Cleanup ( u) , .. }
361- | FalseUnwind { real_target : ref t, unwind : UnwindAction :: Cleanup ( u) }
362- | InlineAsm { destination : Some ( ref t) , unwind : UnwindAction :: Cleanup ( u) , .. } => {
361+ | FalseUnwind { real_target : ref t, unwind : UnwindAction :: Cleanup ( u) } => {
363362 slice:: from_ref ( t) . into_iter ( ) . copied ( ) . chain ( Some ( u) )
364363 }
365364 Goto { target : ref t }
@@ -368,20 +367,19 @@ impl<'tcx> TerminatorKind<'tcx> {
368367 | Yield { resume : ref t, drop : None , .. }
369368 | Drop { target : ref t, unwind : _, .. }
370369 | Assert { target : ref t, unwind : _, .. }
371- | FalseUnwind { real_target : ref t, unwind : _ }
372- | InlineAsm { destination : None , unwind : UnwindAction :: Cleanup ( ref t) , .. }
373- | InlineAsm { destination : Some ( ref t) , unwind : _, .. } => {
370+ | FalseUnwind { real_target : ref t, unwind : _ } => {
374371 slice:: from_ref ( t) . into_iter ( ) . copied ( ) . chain ( None )
375372 }
376373 UnwindResume
377374 | UnwindTerminate ( _)
378375 | CoroutineDrop
379376 | Return
380377 | Unreachable
381- | Call { target : None , unwind : _, .. }
382- | InlineAsm { destination : None , unwind : _ , .. } => {
383- ( & [ ] ) . into_iter ( ) . copied ( ) . chain ( None )
378+ | Call { target : None , unwind : _, .. } => ( & [ ] ) . into_iter ( ) . copied ( ) . chain ( None ) ,
379+ InlineAsm { ref targets , unwind : UnwindAction :: Cleanup ( u ) , .. } => {
380+ targets . iter ( ) . copied ( ) . chain ( Some ( u ) )
384381 }
382+ InlineAsm { ref targets, unwind : _, .. } => targets. iter ( ) . copied ( ) . chain ( None ) ,
385383 SwitchInt { ref targets, .. } => targets. targets . iter ( ) . copied ( ) . chain ( None ) ,
386384 FalseEdge { ref real_target, imaginary_target } => {
387385 slice:: from_ref ( real_target) . into_iter ( ) . copied ( ) . chain ( Some ( imaginary_target) )
@@ -396,30 +394,28 @@ impl<'tcx> TerminatorKind<'tcx> {
396394 | Yield { resume : ref mut t, drop : Some ( ref mut u) , .. }
397395 | Drop { target : ref mut t, unwind : UnwindAction :: Cleanup ( ref mut u) , .. }
398396 | Assert { target : ref mut t, unwind : UnwindAction :: Cleanup ( ref mut u) , .. }
399- | FalseUnwind { real_target : ref mut t, unwind : UnwindAction :: Cleanup ( ref mut u) }
400- | InlineAsm {
401- destination : Some ( ref mut t) ,
402- unwind : UnwindAction :: Cleanup ( ref mut u) ,
403- ..
404- } => slice:: from_mut ( t) . into_iter ( ) . chain ( Some ( u) ) ,
397+ | FalseUnwind { real_target : ref mut t, unwind : UnwindAction :: Cleanup ( ref mut u) } => {
398+ slice:: from_mut ( t) . into_iter ( ) . chain ( Some ( u) )
399+ }
405400 Goto { target : ref mut t }
406401 | Call { target : None , unwind : UnwindAction :: Cleanup ( ref mut t) , .. }
407402 | Call { target : Some ( ref mut t) , unwind : _, .. }
408403 | Yield { resume : ref mut t, drop : None , .. }
409404 | Drop { target : ref mut t, unwind : _, .. }
410405 | Assert { target : ref mut t, unwind : _, .. }
411- | FalseUnwind { real_target : ref mut t, unwind : _ }
412- | InlineAsm { destination : None , unwind : UnwindAction :: Cleanup ( ref mut t) , .. }
413- | InlineAsm { destination : Some ( ref mut t) , unwind : _, .. } => {
406+ | FalseUnwind { real_target : ref mut t, unwind : _ } => {
414407 slice:: from_mut ( t) . into_iter ( ) . chain ( None )
415408 }
416409 UnwindResume
417410 | UnwindTerminate ( _)
418411 | CoroutineDrop
419412 | Return
420413 | Unreachable
421- | Call { target : None , unwind : _, .. }
422- | InlineAsm { destination : None , unwind : _, .. } => ( & mut [ ] ) . into_iter ( ) . chain ( None ) ,
414+ | Call { target : None , unwind : _, .. } => ( & mut [ ] ) . into_iter ( ) . chain ( None ) ,
415+ InlineAsm { ref mut targets, unwind : UnwindAction :: Cleanup ( ref mut u) , .. } => {
416+ targets. iter_mut ( ) . chain ( Some ( u) )
417+ }
418+ InlineAsm { ref mut targets, unwind : _, .. } => targets. iter_mut ( ) . chain ( None ) ,
423419 SwitchInt { ref mut targets, .. } => targets. targets . iter_mut ( ) . chain ( None ) ,
424420 FalseEdge { ref mut real_target, ref mut imaginary_target } => {
425421 slice:: from_mut ( real_target) . into_iter ( ) . chain ( Some ( imaginary_target) )
@@ -495,6 +491,12 @@ pub enum TerminatorEdges<'mir, 'tcx> {
495491 cleanup : Option < BasicBlock > ,
496492 place : CallReturnPlaces < ' mir , ' tcx > ,
497493 } ,
494+ /// Special action for `InlineAsm` terminators.
495+ InlineAsm {
496+ targets : & ' mir [ BasicBlock ] ,
497+ cleanup : Option < BasicBlock > ,
498+ place : CallReturnPlaces < ' mir , ' tcx > ,
499+ } ,
498500 /// Special edge for `SwitchInt`.
499501 SwitchInt { targets : & ' mir SwitchTargets , discr : & ' mir Operand < ' tcx > } ,
500502}
@@ -575,10 +577,10 @@ impl<'tcx> TerminatorKind<'tcx> {
575577 ref operands,
576578 options : _,
577579 line_spans : _,
578- destination ,
580+ ref targets ,
579581 unwind,
580- } => TerminatorEdges :: AssignOnReturn {
581- return_ : destination ,
582+ } => TerminatorEdges :: InlineAsm {
583+ targets ,
582584 cleanup : unwind. cleanup_block ( ) ,
583585 place : CallReturnPlaces :: InlineAsm ( operands) ,
584586 } ,
0 commit comments