diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-08-25 17:52:37 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-08-26 09:35:28 +1000 |
| commit | e4bf113027aca77fea447e15fc09a7c8ded701e9 (patch) | |
| tree | b6eff452338b37a0e064a6ac6ca32c8828bab105 /compiler/rustc_codegen_gcc/src/abi.rs | |
| parent | 263c426bfd2d8119ad9f615fc0616cf01984435a (diff) | |
| download | rust-e4bf113027aca77fea447e15fc09a7c8ded701e9.tar.gz rust-e4bf113027aca77fea447e15fc09a7c8ded701e9.zip | |
Box `CastTarget` within `PassMode`.
Because `PassMode::Cast` is by far the largest variant, but is relatively rare. This requires making `PassMode` not impl `Copy`, and `Clone` is no longer necessary. This causes lots of sigil adjusting, but nothing very notable.
Diffstat (limited to 'compiler/rustc_codegen_gcc/src/abi.rs')
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/abi.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_gcc/src/abi.rs b/compiler/rustc_codegen_gcc/src/abi.rs index 0ed3e1fbe93..9b55db6a547 100644 --- a/compiler/rustc_codegen_gcc/src/abi.rs +++ b/compiler/rustc_codegen_gcc/src/abi.rs @@ -133,7 +133,7 @@ impl<'gcc, 'tcx> FnAbiGccExt<'gcc, 'tcx> for FnAbi<'tcx, Ty<'tcx>> { match self.ret.mode { PassMode::Ignore => cx.type_void(), PassMode::Direct(_) | PassMode::Pair(..) => self.ret.layout.immediate_gcc_type(cx), - PassMode::Cast(cast) => cast.gcc_type(cx), + PassMode::Cast(ref cast) => cast.gcc_type(cx), PassMode::Indirect { .. } => { argument_tys.push(cx.type_ptr_to(self.ret.memory_ty(cx))); cx.type_void() @@ -157,7 +157,7 @@ impl<'gcc, 'tcx> FnAbiGccExt<'gcc, 'tcx> for FnAbi<'tcx, Ty<'tcx>> { PassMode::Indirect { extra_attrs: Some(_), .. } => { unimplemented!(); } - PassMode::Cast(cast) => cast.gcc_type(cx), + PassMode::Cast(ref cast) => cast.gcc_type(cx), PassMode::Indirect { extra_attrs: None, on_stack: true, .. } => { on_stack_param_indices.insert(argument_tys.len()); arg.memory_ty(cx) |
