diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-08-25 19:18:01 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-08-26 10:53:41 +1000 |
| commit | b853e8a6194637751bffbcfdd5bb51c7bfecdff5 (patch) | |
| tree | 2c15425811ff1409c2ee32eb0f47b0d046bdce68 /compiler/rustc_codegen_llvm/src | |
| parent | feeaa4db3cb990463871e35b16b3449023cb791d (diff) | |
| download | rust-b853e8a6194637751bffbcfdd5bb51c7bfecdff5.tar.gz rust-b853e8a6194637751bffbcfdd5bb51c7bfecdff5.zip | |
Turn `ArgAbi::pad` into a `bool`.
Because it's only ever set to `None` or `Some(Reg::i32())`.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/abi.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_llvm/src/abi.rs b/compiler/rustc_codegen_llvm/src/abi.rs index a06b07c1149..168cf3d0b58 100644 --- a/compiler/rustc_codegen_llvm/src/abi.rs +++ b/compiler/rustc_codegen_llvm/src/abi.rs @@ -345,8 +345,8 @@ impl<'ll, 'tcx> FnAbiLlvmExt<'ll, 'tcx> for FnAbi<'tcx, Ty<'tcx>> { for arg in args { // add padding - if let Some(ty) = arg.pad { - llargument_tys.push(ty.llvm_type(cx)); + if arg.pad_i32 { + llargument_tys.push(Reg::i32().llvm_type(cx)); } let llarg_ty = match &arg.mode { @@ -440,7 +440,7 @@ impl<'ll, 'tcx> FnAbiLlvmExt<'ll, 'tcx> for FnAbi<'tcx, Ty<'tcx>> { _ => {} } for arg in self.args.iter() { - if arg.pad.is_some() { + if arg.pad_i32 { apply(&ArgAttributes::new()); } match &arg.mode { @@ -516,7 +516,7 @@ impl<'ll, 'tcx> FnAbiLlvmExt<'ll, 'tcx> for FnAbi<'tcx, Ty<'tcx>> { } } for arg in self.args.iter() { - if arg.pad.is_some() { + if arg.pad_i32 { apply(bx.cx, &ArgAttributes::new()); } match &arg.mode { |
