mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +00:00
Feat: make cg_ssa get_param borrow the builder mutable
This commit is contained in:
parent
de4b242e1e
commit
870b8311c1
@ -14,7 +14,7 @@ impl<'a, 'gcc, 'tcx> AbiBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
|
|||||||
// TODO(antoyo)
|
// TODO(antoyo)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_param(&self, index: usize) -> Self::Value {
|
fn get_param(&mut self, index: usize) -> Self::Value {
|
||||||
self.cx.current_func.borrow().expect("current func")
|
self.cx.current_func.borrow().expect("current func")
|
||||||
.get_param(index as i32)
|
.get_param(index as i32)
|
||||||
.to_rvalue()
|
.to_rvalue()
|
||||||
|
@ -607,7 +607,7 @@ impl AbiBuilderMethods<'tcx> for Builder<'a, 'll, 'tcx> {
|
|||||||
fn_abi.apply_attrs_callsite(self, callsite)
|
fn_abi.apply_attrs_callsite(self, callsite)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_param(&self, index: usize) -> Self::Value {
|
fn get_param(&mut self, index: usize) -> Self::Value {
|
||||||
llvm::get_param(self.llfn(), index as c_uint)
|
llvm::get_param(self.llfn(), index as c_uint)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,5 +4,5 @@ use rustc_target::abi::call::FnAbi;
|
|||||||
|
|
||||||
pub trait AbiBuilderMethods<'tcx>: BackendTypes {
|
pub trait AbiBuilderMethods<'tcx>: BackendTypes {
|
||||||
fn apply_attrs_callsite(&mut self, fn_abi: &FnAbi<'tcx, Ty<'tcx>>, callsite: Self::Value);
|
fn apply_attrs_callsite(&mut self, fn_abi: &FnAbi<'tcx, Ty<'tcx>>, callsite: Self::Value);
|
||||||
fn get_param(&self, index: usize) -> Self::Value;
|
fn get_param(&mut self, index: usize) -> Self::Value;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user