]> git.lizzy.rs Git - rust.git/blob - src/librustc_codegen_ssa/traits/abi.rs
Rollup merge of #58440 - gnzlbg:v6, r=japaric
[rust.git] / src / librustc_codegen_ssa / traits / abi.rs
1 use super::BackendTypes;
2 use rustc::ty::{FnSig, Instance, Ty};
3 use rustc_target::abi::call::FnType;
4
5 pub trait AbiMethods<'tcx> {
6     fn new_fn_type(&self, sig: FnSig<'tcx>, extra_args: &[Ty<'tcx>]) -> FnType<'tcx, Ty<'tcx>>;
7     fn new_vtable(&self, sig: FnSig<'tcx>, extra_args: &[Ty<'tcx>]) -> FnType<'tcx, Ty<'tcx>>;
8     fn fn_type_of_instance(&self, instance: &Instance<'tcx>) -> FnType<'tcx, Ty<'tcx>>;
9 }
10
11 pub trait AbiBuilderMethods<'tcx>: BackendTypes {
12     fn apply_attrs_callsite(&mut self, ty: &FnType<'tcx, Ty<'tcx>>, callsite: Self::Value);
13 }