diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-08-25 19:02:22 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-08-26 10:29:40 +1000 |
| commit | 4df7bffa953d4583f6785114519602a4f1898f8d (patch) | |
| tree | ef33650693da5af63e7a49e85668608a84e0c079 /compiler/rustc_codegen_llvm/src | |
| parent | e4bf113027aca77fea447e15fc09a7c8ded701e9 (diff) | |
| download | rust-4df7bffa953d4583f6785114519602a4f1898f8d.tar.gz rust-4df7bffa953d4583f6785114519602a4f1898f8d.zip | |
Change `FnAbi::fixed_count` to a `u32`.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/abi.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/abi.rs b/compiler/rustc_codegen_llvm/src/abi.rs index 09c53afa6c8..b88db6f6f98 100644 --- a/compiler/rustc_codegen_llvm/src/abi.rs +++ b/compiler/rustc_codegen_llvm/src/abi.rs @@ -325,7 +325,8 @@ impl<'ll, 'tcx> FnAbiLlvmExt<'ll, 'tcx> for FnAbi<'tcx, Ty<'tcx>> { fn llvm_type(&self, cx: &CodegenCx<'ll, 'tcx>) -> &'ll Type { // Ignore "extra" args from the call site for C variadic functions. // Only the "fixed" args are part of the LLVM function signature. - let args = if self.c_variadic { &self.args[..self.fixed_count] } else { &self.args }; + let args = + if self.c_variadic { &self.args[..self.fixed_count as usize] } else { &self.args }; let args_capacity: usize = args.iter().map(|arg| if arg.pad.is_some() { 1 } else { 0 } + |
