Change InlineAsm to allow multiple targets instead
This commit is contained in:
parent
7152993aa8
commit
b044aaa905
23 changed files with 125 additions and 96 deletions
|
@ -474,10 +474,10 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
|||
operands,
|
||||
options,
|
||||
line_spans,
|
||||
destination: if options.contains(InlineAsmOptions::NORETURN) {
|
||||
None
|
||||
targets: if options.contains(InlineAsmOptions::NORETURN) {
|
||||
Vec::new()
|
||||
} else {
|
||||
Some(destination_block)
|
||||
vec![destination_block]
|
||||
},
|
||||
unwind: if options.contains(InlineAsmOptions::MAY_UNWIND) {
|
||||
UnwindAction::Continue
|
||||
|
|
|
@ -199,9 +199,10 @@ impl<'mir, 'tcx, C: TerminatorClassifier<'tcx>> TriColorVisitor<BasicBlocks<'tcx
|
|||
| TerminatorKind::Unreachable
|
||||
| TerminatorKind::Yield { .. } => ControlFlow::Break(NonRecursive),
|
||||
|
||||
// A diverging InlineAsm is treated as non-recursing
|
||||
TerminatorKind::InlineAsm { destination, .. } => {
|
||||
if destination.is_some() {
|
||||
// A InlineAsm without targets (diverging and contains no labels)
|
||||
// is treated as non-recursing.
|
||||
TerminatorKind::InlineAsm { ref targets, .. } => {
|
||||
if !targets.is_empty() {
|
||||
ControlFlow::Continue(())
|
||||
} else {
|
||||
ControlFlow::Break(NonRecursive)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue