Make abi::Abi Copy and remove a *lot* of refs

fix

fix

Remove more refs and clones

fix

more

fix
This commit is contained in:
Andreas Liljeqvist 2021-08-29 11:06:55 +02:00
parent 86ff6aeb82
commit 5b2f757dae
33 changed files with 139 additions and 163 deletions

View file

@ -228,7 +228,7 @@ impl ConstMethods<'tcx> for CodegenCx<'ll, 'tcx> {
})
}
fn scalar_to_backend(&self, cv: Scalar, layout: &abi::Scalar, llty: &'ll Type) -> &'ll Value {
fn scalar_to_backend(&self, cv: Scalar, layout: abi::Scalar, llty: &'ll Type) -> &'ll Value {
let bitsize = if layout.is_bool() { 1 } else { layout.value.size(self).bits() };
match cv {
Scalar::Int(ScalarInt::ZST) => {