Teach llvm backend how to fall back to default bodies
This commit is contained in:
parent
432635a9ea
commit
9a0743747f
11 changed files with 109 additions and 103 deletions
|
@ -8,6 +8,8 @@ pub trait IntrinsicCallMethods<'tcx>: BackendTypes {
|
|||
/// Remember to add all intrinsics here, in `compiler/rustc_hir_analysis/src/check/mod.rs`,
|
||||
/// and in `library/core/src/intrinsics.rs`; if you need access to any LLVM intrinsics,
|
||||
/// add them to `compiler/rustc_codegen_llvm/src/context.rs`.
|
||||
/// Returns `Err` if another instance should be called instead. This is used to invoke
|
||||
/// intrinsic default bodies in case an intrinsic is not implemented by the backend.
|
||||
fn codegen_intrinsic_call(
|
||||
&mut self,
|
||||
instance: ty::Instance<'tcx>,
|
||||
|
@ -15,7 +17,7 @@ pub trait IntrinsicCallMethods<'tcx>: BackendTypes {
|
|||
args: &[OperandRef<'tcx, Self::Value>],
|
||||
llresult: Self::Value,
|
||||
span: Span,
|
||||
);
|
||||
) -> Result<(), ty::Instance<'tcx>>;
|
||||
|
||||
fn abort(&mut self);
|
||||
fn assume(&mut self, val: Self::Value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue