Unify intrinsics body handling in StableMIR
rust-lang/rust#120675 introduced a new mechanism to declare intrinsics which will potentially replace the rust-intrinsic ABI. The new mechanism introduces a placeholder body and mark the intrinsic with #[rustc_intrinsic_must_be_overridden]. In practice, this means that backends should not generate code for the placeholder, and shim the intrinsic. The new annotation is an internal compiler implementation, and it doesn't need to be exposed to StableMIR users. In this PR, intrinsics marked with `rustc_intrinsic_must_be_overridden` are handled the same way as intrinsics that do not have a body.
This commit is contained in:
parent
0285dab54f
commit
c8c6598f17
5 changed files with 42 additions and 25 deletions
|
@ -94,10 +94,6 @@ pub trait Context {
|
|||
/// Retrieve the plain function name of an intrinsic.
|
||||
fn intrinsic_name(&self, def: IntrinsicDef) -> Symbol;
|
||||
|
||||
/// Returns whether the intrinsic has no meaningful body and all backends
|
||||
/// need to shim all calls to it.
|
||||
fn intrinsic_must_be_overridden(&self, def: IntrinsicDef) -> bool;
|
||||
|
||||
/// Retrieve the closure signature for the given generic arguments.
|
||||
fn closure_sig(&self, args: &GenericArgs) -> PolyFnSig;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue