Skip to content

Commit f1ed3a8

Browse files
committed
s/FuncId/Function
1 parent 5f6ddb9 commit f1ed3a8

File tree

10 files changed

+14
-14
lines changed

10 files changed

+14
-14
lines changed

src/librustc_codegen_llvm/builder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const UNNAMED: *const c_char = EMPTY_C_STR.as_ptr();
5252

5353
impl BackendTypes for Builder<'_, 'll, 'tcx> {
5454
type Value = <CodegenCx<'ll, 'tcx> as BackendTypes>::Value;
55-
type FuncId = <CodegenCx<'ll, 'tcx> as BackendTypes>::FuncId;
55+
type Function = <CodegenCx<'ll, 'tcx> as BackendTypes>::Function;
5656
type BasicBlock = <CodegenCx<'ll, 'tcx> as BackendTypes>::BasicBlock;
5757
type Type = <CodegenCx<'ll, 'tcx> as BackendTypes>::Type;
5858
type Funclet = <CodegenCx<'ll, 'tcx> as BackendTypes>::Funclet;

src/librustc_codegen_llvm/common.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ impl Funclet<'ll> {
8686

8787
impl BackendTypes for CodegenCx<'ll, 'tcx> {
8888
type Value = &'ll Value;
89-
type FuncId = &'ll Value;
89+
type Function = &'ll Value;
9090

9191
type BasicBlock = &'ll BasicBlock;
9292
type Type = &'ll Type;

src/librustc_codegen_ssa/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ pub trait BuilderMethods<'a, 'tcx>:
8484
{
8585
fn new_block<'b>(
8686
cx: &'a Self::CodegenCx,
87-
llfn: Self::FuncId,
87+
llfn: Self::Function,
8888
name: &'b str
8989
) -> Self;
9090
/* ... */

src/librustc_codegen_ssa/mir/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pub struct FunctionCx<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> {
3030

3131
debug_context: FunctionDebugContext<Bx::DIScope>,
3232

33-
llfn: Bx::FuncId,
33+
llfn: Bx::Function,
3434

3535
cx: &'a Bx::CodegenCx,
3636

@@ -183,7 +183,7 @@ impl<'a, 'tcx, V: CodegenObject> LocalRef<'tcx, V> {
183183

184184
pub fn codegen_mir<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
185185
cx: &'a Bx::CodegenCx,
186-
llfn: Bx::FuncId,
186+
llfn: Bx::Function,
187187
mir: &'a Body<'tcx>,
188188
instance: Instance<'tcx>,
189189
sig: ty::FnSig<'tcx>,

src/librustc_codegen_ssa/traits/backend.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use syntax_pos::symbol::InternedString;
1414

1515
pub trait BackendTypes {
1616
type Value: CodegenObject;
17-
type FuncId: CodegenObject;
17+
type Function: CodegenObject;
1818

1919
type BasicBlock: Copy;
2020
type Type: CodegenObject;

src/librustc_codegen_ssa/traits/builder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ pub trait BuilderMethods<'a, 'tcx>:
3434
+ HasTargetSpec
3535

3636
{
37-
fn new_block<'b>(cx: &'a Self::CodegenCx, llfn: Self::FuncId, name: &'b str) -> Self;
37+
fn new_block<'b>(cx: &'a Self::CodegenCx, llfn: Self::Function, name: &'b str) -> Self;
3838
fn with_cx(cx: &'a Self::CodegenCx) -> Self;
3939
fn build_sibling_block(&self, name: &str) -> Self;
4040
fn cx(&self) -> &Self::CodegenCx;

src/librustc_codegen_ssa/traits/debuginfo.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pub trait DebugInfoMethods<'tcx>: BackendTypes {
2020
&self,
2121
instance: Instance<'tcx>,
2222
sig: ty::FnSig<'tcx>,
23-
llfn: Self::FuncId,
23+
llfn: Self::Function,
2424
mir: &mir::Body<'_>,
2525
) -> FunctionDebugContext<Self::DIScope>;
2626

src/librustc_codegen_ssa/traits/declare.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ pub trait DeclareMethods<'tcx>: BackendTypes {
1717
///
1818
/// If there’s a value with the same name already declared, the function will
1919
/// update the declaration and return existing Value instead.
20-
fn declare_cfn(&self, name: &str, fn_type: Self::Type) -> Self::FuncId;
20+
fn declare_cfn(&self, name: &str, fn_type: Self::Type) -> Self::Function;
2121

2222
/// Declare a Rust function.
2323
///
2424
/// If there’s a value with the same name already declared, the function will
2525
/// update the declaration and return existing Value instead.
26-
fn declare_fn(&self, name: &str, sig: ty::PolyFnSig<'tcx>) -> Self::FuncId;
26+
fn declare_fn(&self, name: &str, sig: ty::PolyFnSig<'tcx>) -> Self::Function;
2727

2828
/// Declare a global with an intention to define it.
2929
///

src/librustc_codegen_ssa/traits/misc.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ pub trait MiscMethods<'tcx>: BackendTypes {
1111
&self,
1212
) -> &RefCell<FxHashMap<(Ty<'tcx>, Option<ty::PolyExistentialTraitRef<'tcx>>), Self::Value>>;
1313
fn check_overflow(&self) -> bool;
14-
fn instances(&self) -> &RefCell<FxHashMap<Instance<'tcx>, Self::FuncId>>;
14+
fn instances(&self) -> &RefCell<FxHashMap<Instance<'tcx>, Self::Function>>;
1515
fn get_fn(&self, instance: Instance<'tcx>) -> Self::Value;
1616
fn eh_personality(&self) -> Self::Value;
1717
fn eh_unwind_resume(&self) -> Self::Value;
1818
fn sess(&self) -> &Session;
1919
fn codegen_unit(&self) -> &Arc<CodegenUnit<'tcx>>;
2020
fn used_statics(&self) -> &RefCell<Vec<Self::Value>>;
21-
fn set_frame_pointer_elimination(&self, llfn: Self::FuncId);
22-
fn apply_target_cpu_attr(&self, llfn: Self::FuncId);
21+
fn set_frame_pointer_elimination(&self, llfn: Self::Function);
22+
fn apply_target_cpu_attr(&self, llfn: Self::Function);
2323
fn create_used_variable(&self);
2424
}

src/librustc_codegen_ssa/traits/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ pub trait HasCodegen<'tcx>:
8888
type CodegenCx: CodegenMethods<'tcx>
8989
+ BackendTypes<
9090
Value = Self::Value,
91-
FuncId = Self::FuncId,
91+
Function = Self::Function,
9292
BasicBlock = Self::BasicBlock,
9393
Type = Self::Type,
9494
Funclet = Self::Funclet,

0 commit comments

Comments
 (0)