rustc: rename FnAbi::new to FnAbi::of_fn_ptr.
This commit is contained in:
parent
052d0edbc1
commit
2b921d51d7
@ -2347,7 +2347,7 @@ where
|
||||
+ HasTyCtxt<'tcx>
|
||||
+ HasParamEnv<'tcx>,
|
||||
{
|
||||
fn new(cx: &C, sig: ty::FnSig<'tcx>, extra_args: &[Ty<'tcx>]) -> Self;
|
||||
fn of_fn_ptr(cx: &C, sig: ty::FnSig<'tcx>, extra_args: &[Ty<'tcx>]) -> Self;
|
||||
fn of_instance(cx: &C, instance: ty::Instance<'tcx>, extra_args: &[Ty<'tcx>]) -> Self;
|
||||
fn new_internal(
|
||||
cx: &C,
|
||||
@ -2366,7 +2366,7 @@ where
|
||||
+ HasTyCtxt<'tcx>
|
||||
+ HasParamEnv<'tcx>,
|
||||
{
|
||||
fn new(cx: &C, sig: ty::FnSig<'tcx>, extra_args: &[Ty<'tcx>]) -> Self {
|
||||
fn of_fn_ptr(cx: &C, sig: ty::FnSig<'tcx>, extra_args: &[Ty<'tcx>]) -> Self {
|
||||
call::FnAbi::new_internal(cx, sig, extra_args, |ty, _| ArgAbi::new(cx.layout_of(ty)))
|
||||
}
|
||||
|
||||
|
@ -421,7 +421,7 @@ impl MiscMethods<'tcx> for CodegenCx<'ll, 'tcx> {
|
||||
Abi::C
|
||||
);
|
||||
|
||||
let fn_abi = FnAbi::new(self, sig, &[]);
|
||||
let fn_abi = FnAbi::of_fn_ptr(self, sig, &[]);
|
||||
let llfn = self.declare_fn("rust_eh_unwind_resume", &fn_abi);
|
||||
attributes::apply_target_cpu_attr(self, llfn);
|
||||
unwresume.set(Some(llfn));
|
||||
|
@ -1012,7 +1012,7 @@ fn gen_fn<'ll, 'tcx>(
|
||||
hir::Unsafety::Unsafe,
|
||||
Abi::Rust
|
||||
);
|
||||
let fn_abi = FnAbi::new(cx, rust_fn_sig, &[]);
|
||||
let fn_abi = FnAbi::of_fn_ptr(cx, rust_fn_sig, &[]);
|
||||
let llfn = cx.declare_fn(name, &fn_abi);
|
||||
// FIXME(eddyb) find a nicer way to do this.
|
||||
unsafe { llvm::LLVMRustSetLinkage(llfn, llvm::Linkage::InternalLinkage) };
|
||||
|
@ -239,7 +239,7 @@ impl<'tcx> LayoutLlvmExt<'tcx> for TyLayout<'tcx> {
|
||||
ty::ParamEnv::reveal_all(),
|
||||
&sig,
|
||||
);
|
||||
cx.fn_ptr_backend_type(&FnAbi::new(cx, sig, &[]))
|
||||
cx.fn_ptr_backend_type(&FnAbi::of_fn_ptr(cx, sig, &[]))
|
||||
}
|
||||
_ => self.scalar_llvm_type_at(cx, scalar, Size::ZERO)
|
||||
};
|
||||
|
@ -529,7 +529,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
|
||||
|
||||
let fn_abi = match instance {
|
||||
Some(instance) => FnAbi::of_instance(&bx, instance, &extra_args),
|
||||
None => FnAbi::new(&bx, sig, &extra_args)
|
||||
None => FnAbi::of_fn_ptr(&bx, sig, &extra_args)
|
||||
};
|
||||
|
||||
// For normal codegen, this Miri-specific intrinsic is just a NOP.
|
||||
|
Loading…
x
Reference in New Issue
Block a user