Use &mut Bx more.

For the next commit, `FunctionCx::codegen_*_terminator` need to take a
`&mut Bx` instead of consuming a `Bx`. This triggers a cascade of
similar changes across multiple functions. The resulting code is more
concise and replaces many `&mut bx` expressions with `bx`.
This commit is contained in:
Nicholas Nethercote
2022-11-09 11:04:10 +11:00
parent a00f8ba7fc
commit 68194aa8d5
6 changed files with 176 additions and 218 deletions

View File

@@ -151,11 +151,11 @@ pub trait BuilderMethods<'a, 'tcx>:
/// Called for Rvalue::Repeat when the elem is neither a ZST nor optimizable using memset.
fn write_operand_repeatedly(
self,
&mut self,
elem: OperandRef<'tcx, Self::Value>,
count: u64,
dest: PlaceRef<'tcx, Self::Value>,
) -> Self;
);
fn range_metadata(&mut self, load: Self::Value, range: WrappingRange);
fn nonnull_metadata(&mut self, load: Self::Value);