Skip to content

Commit 0b65020

Browse files
committed
rustc: rename FnAbi::new to FnAbi::of_fn_ptr.
1 parent a0ed842 commit 0b65020

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

src/librustc/ty/layout.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2495,7 +2495,7 @@ where
24952495
+ HasTyCtxt<'tcx>
24962496
+ HasParamEnv<'tcx>,
24972497
{
2498-
fn new(cx: &C, sig: ty::FnSig<'tcx>, extra_args: &[Ty<'tcx>]) -> Self;
2498+
fn of_fn_ptr(cx: &C, sig: ty::FnSig<'tcx>, extra_args: &[Ty<'tcx>]) -> Self;
24992499
fn of_instance(cx: &C, instance: ty::Instance<'tcx>, extra_args: &[Ty<'tcx>]) -> Self;
25002500
fn new_internal(
25012501
cx: &C,
@@ -2514,7 +2514,7 @@ where
25142514
+ HasTyCtxt<'tcx>
25152515
+ HasParamEnv<'tcx>,
25162516
{
2517-
fn new(cx: &C, sig: ty::FnSig<'tcx>, extra_args: &[Ty<'tcx>]) -> Self {
2517+
fn of_fn_ptr(cx: &C, sig: ty::FnSig<'tcx>, extra_args: &[Ty<'tcx>]) -> Self {
25182518
call::FnAbi::new_internal(cx, sig, extra_args, |ty, _| ArgAbi::new(cx.layout_of(ty)))
25192519
}
25202520

src/librustc_codegen_llvm/context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ impl MiscMethods<'tcx> for CodegenCx<'ll, 'tcx> {
417417
Abi::C
418418
);
419419

420-
let fn_abi = FnAbi::new(self, sig, &[]);
420+
let fn_abi = FnAbi::of_fn_ptr(self, sig, &[]);
421421
let llfn = self.declare_fn("rust_eh_unwind_resume", &fn_abi);
422422
attributes::apply_target_cpu_attr(self, llfn);
423423
unwresume.set(Some(llfn));

src/librustc_codegen_llvm/intrinsic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1008,7 +1008,7 @@ fn gen_fn<'ll, 'tcx>(
10081008
hir::Unsafety::Unsafe,
10091009
Abi::Rust
10101010
);
1011-
let fn_abi = FnAbi::new(cx, rust_fn_sig, &[]);
1011+
let fn_abi = FnAbi::of_fn_ptr(cx, rust_fn_sig, &[]);
10121012
let llfn = cx.declare_fn(name, &fn_abi);
10131013
// FIXME(eddyb) find a nicer way to do this.
10141014
unsafe { llvm::LLVMRustSetLinkage(llfn, llvm::Linkage::InternalLinkage) };

src/librustc_codegen_llvm/type_of.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ impl<'tcx> LayoutLlvmExt<'tcx> for TyLayout<'tcx> {
239239
ty::ParamEnv::reveal_all(),
240240
&sig,
241241
);
242-
cx.fn_ptr_backend_type(&FnAbi::new(cx, sig, &[]))
242+
cx.fn_ptr_backend_type(&FnAbi::of_fn_ptr(cx, sig, &[]))
243243
}
244244
_ => self.scalar_llvm_type_at(cx, scalar, Size::ZERO)
245245
};

src/librustc_codegen_ssa/mir/block.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
529529

530530
let fn_abi = match instance {
531531
Some(instance) => FnAbi::of_instance(&bx, instance, &extra_args),
532-
None => FnAbi::new(&bx, sig, &extra_args)
532+
None => FnAbi::of_fn_ptr(&bx, sig, &extra_args)
533533
};
534534

535535
// Emit a panic or a no-op for `panic_if_uninhabited`.

0 commit comments

Comments
 (0)