diff options
| author | Zachary S <zasample18+github@gmail.com> | 2025-09-12 09:49:41 -0500 | 
|---|---|---|
| committer | Zachary S <zasample18+github@gmail.com> | 2025-09-12 09:49:41 -0500 | 
| commit | baed55cceffaa3b5dd0754436b413fa9aef544af (patch) | |
| tree | db741e04238e1f0d693f07db9163d9d22cce5096 /compiler/rustc_codegen_gcc | |
| parent | 408eacfb95ea19e248c0fe5e377980bc00682c1b (diff) | |
| download | rust-baed55cceffaa3b5dd0754436b413fa9aef544af.tar.gz rust-baed55cceffaa3b5dd0754436b413fa9aef544af.zip | |
Remove unreachable unsized arg handling in `store_fn_arg/store_arg` in codegen
Diffstat (limited to 'compiler/rustc_codegen_gcc')
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/intrinsic/mod.rs | 9 | 
1 files changed, 2 insertions, 7 deletions
| diff --git a/compiler/rustc_codegen_gcc/src/intrinsic/mod.rs b/compiler/rustc_codegen_gcc/src/intrinsic/mod.rs index eb0a5336a1f..84fa56cf903 100644 --- a/compiler/rustc_codegen_gcc/src/intrinsic/mod.rs +++ b/compiler/rustc_codegen_gcc/src/intrinsic/mod.rs @@ -730,7 +730,7 @@ impl<'gcc, 'tcx> ArgAbiExt<'gcc, 'tcx> for ArgAbi<'tcx, Ty<'tcx>> { if self.is_sized_indirect() { OperandValue::Ref(PlaceValue::new_sized(val, self.layout.align.abi)).store(bx, dst) } else if self.is_unsized_indirect() { - bug!("unsized `ArgAbi` must be handled through `store_fn_arg`"); + bug!("unsized `ArgAbi` cannot be stored"); } else if let PassMode::Cast { ref cast, .. } = self.mode { // FIXME(eddyb): Figure out when the simpler Store is safe, clang // uses it for i16 -> {i8, i8}, but not for i24 -> {i8, i8, i8}. @@ -797,12 +797,7 @@ impl<'gcc, 'tcx> ArgAbiExt<'gcc, 'tcx> for ArgAbi<'tcx, Ty<'tcx>> { OperandValue::Pair(next(), next()).store(bx, dst); } PassMode::Indirect { meta_attrs: Some(_), .. } => { - let place_val = PlaceValue { - llval: next(), - llextra: Some(next()), - align: self.layout.align.abi, - }; - OperandValue::Ref(place_val).store(bx, dst); + bug!("unsized `ArgAbi` cannot be stored"); } PassMode::Direct(_) | PassMode::Indirect { meta_attrs: None, .. } | 
