Skip to content

Commit 2b921d5

Browse files
committed
rustc: rename FnAbi::new to FnAbi::of_fn_ptr.
1 parent 052d0ed commit 2b921d5

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

src/librustc/ty/layout.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2347,7 +2347,7 @@ where
23472347
+ HasTyCtxt<'tcx>
23482348
+ HasParamEnv<'tcx>,
23492349
{
2350-
fn new(cx: &C, sig: ty::FnSig<'tcx>, extra_args: &[Ty<'tcx>]) -> Self;
2350+
fn of_fn_ptr(cx: &C, sig: ty::FnSig<'tcx>, extra_args: &[Ty<'tcx>]) -> Self;
23512351
fn of_instance(cx: &C, instance: ty::Instance<'tcx>, extra_args: &[Ty<'tcx>]) -> Self;
23522352
fn new_internal(
23532353
cx: &C,
@@ -2366,7 +2366,7 @@ where
23662366
+ HasTyCtxt<'tcx>
23672367
+ HasParamEnv<'tcx>,
23682368
{
2369-
fn new(cx: &C, sig: ty::FnSig<'tcx>, extra_args: &[Ty<'tcx>]) -> Self {
2369+
fn of_fn_ptr(cx: &C, sig: ty::FnSig<'tcx>, extra_args: &[Ty<'tcx>]) -> Self {
23702370
call::FnAbi::new_internal(cx, sig, extra_args, |ty, _| ArgAbi::new(cx.layout_of(ty)))
23712371
}
23722372

src/librustc_codegen_llvm/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ impl MiscMethods<'tcx> for CodegenCx<'ll, 'tcx> {
421421
Abi::C
422422
);
423423

424-
let fn_abi = FnAbi::new(self, sig, &[]);
424+
let fn_abi = FnAbi::of_fn_ptr(self, sig, &[]);
425425
let llfn = self.declare_fn("rust_eh_unwind_resume", &fn_abi);
426426
attributes::apply_target_cpu_attr(self, llfn);
427427
unwresume.set(Some(llfn));

src/librustc_codegen_llvm/intrinsic.rs

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

src/librustc_codegen_llvm/type_of.rs

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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
// For normal codegen, this Miri-specific intrinsic is just a NOP.

0 commit comments

Comments
 (0)