Skip to content

Commit 870b831

Browse files
committed
Feat: make cg_ssa get_param borrow the builder mutable
1 parent de4b242 commit 870b831

File tree

3 files changed

+3
-3
lines changed
  • compiler

3 files changed

+3
-3
lines changed

compiler/rustc_codegen_gcc/src/abi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ impl<'a, 'gcc, 'tcx> AbiBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
1414
// TODO(antoyo)
1515
}
1616

17-
fn get_param(&self, index: usize) -> Self::Value {
17+
fn get_param(&mut self, index: usize) -> Self::Value {
1818
self.cx.current_func.borrow().expect("current func")
1919
.get_param(index as i32)
2020
.to_rvalue()

compiler/rustc_codegen_llvm/src/abi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ impl AbiBuilderMethods<'tcx> for Builder<'a, 'll, 'tcx> {
607607
fn_abi.apply_attrs_callsite(self, callsite)
608608
}
609609

610-
fn get_param(&self, index: usize) -> Self::Value {
610+
fn get_param(&mut self, index: usize) -> Self::Value {
611611
llvm::get_param(self.llfn(), index as c_uint)
612612
}
613613
}

compiler/rustc_codegen_ssa/src/traits/abi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ use rustc_target::abi::call::FnAbi;
44

55
pub trait AbiBuilderMethods<'tcx>: BackendTypes {
66
fn apply_attrs_callsite(&mut self, fn_abi: &FnAbi<'tcx, Ty<'tcx>>, callsite: Self::Value);
7-
fn get_param(&self, index: usize) -> Self::Value;
7+
fn get_param(&mut self, index: usize) -> Self::Value;
88
}

0 commit comments

Comments
 (0)