Support tail calls in mir via TerminatorKind::TailCall
This commit is contained in:
parent
c6b883bb2e
commit
9978261a6e
@ -491,6 +491,11 @@ fn codegen_fn_body(fx: &mut FunctionCx<'_, '_, '_>, start_block: Block) {
|
|||||||
)
|
)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
// FIXME(explicit_tail_calls): add support for tail calls to the cranelift backend, once cranelift supports tail calls
|
||||||
|
TerminatorKind::TailCall { fn_span, .. } => span_bug!(
|
||||||
|
*fn_span,
|
||||||
|
"tail calls are not yet supported in `rustc_codegen_cranelift` backend"
|
||||||
|
),
|
||||||
TerminatorKind::InlineAsm {
|
TerminatorKind::InlineAsm {
|
||||||
template,
|
template,
|
||||||
operands,
|
operands,
|
||||||
|
@ -565,6 +565,7 @@ pub(crate) fn mir_operand_get_const_val<'tcx>(
|
|||||||
{
|
{
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
TerminatorKind::TailCall { .. } => return None,
|
||||||
TerminatorKind::Call { .. } => {}
|
TerminatorKind::Call { .. } => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user