diff options
| author | beepster4096 <19316085+beepster4096@users.noreply.github.com> | 2024-01-12 23:05:07 -0800 |
|---|---|---|
| committer | beepster4096 <19316085+beepster4096@users.noreply.github.com> | 2024-01-12 23:19:54 -0800 |
| commit | 41e224b1bc09d4b6528924933d66518bdbc0ef59 (patch) | |
| tree | 7f9a92530bf32ede3631baae72d87c7edb8d3ea1 /compiler/rustc_ty_utils/src | |
| parent | 090d5eac722000906cc00d991f2bf052b0e388c3 (diff) | |
allow system abi to be variadic
Diffstat (limited to 'compiler/rustc_ty_utils/src')
| -rw-r--r-- | compiler/rustc_ty_utils/src/abi.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_ty_utils/src/abi.rs b/compiler/rustc_ty_utils/src/abi.rs index 2772831e731..6e8293dac31 100644 --- a/compiler/rustc_ty_utils/src/abi.rs +++ b/compiler/rustc_ty_utils/src/abi.rs @@ -228,9 +228,9 @@ fn fn_sig_for_fn_abi<'tcx>( } #[inline] -fn conv_from_spec_abi(tcx: TyCtxt<'_>, abi: SpecAbi) -> Conv { +fn conv_from_spec_abi(tcx: TyCtxt<'_>, abi: SpecAbi, c_variadic: bool) -> Conv { use rustc_target::spec::abi::Abi::*; - match tcx.sess.target.adjust_abi(abi) { + match tcx.sess.target.adjust_abi(abi, c_variadic) { RustIntrinsic | PlatformIntrinsic | Rust | RustCall => Conv::Rust, // This is intentionally not using `Conv::Cold`, as that has to preserve @@ -488,7 +488,7 @@ fn fn_abi_new_uncached<'tcx>( ) -> Result<&'tcx FnAbi<'tcx, Ty<'tcx>>, &'tcx FnAbiError<'tcx>> { let sig = cx.tcx.normalize_erasing_late_bound_regions(cx.param_env, sig); - let conv = conv_from_spec_abi(cx.tcx(), sig.abi); + let conv = conv_from_spec_abi(cx.tcx(), sig.abi, sig.c_variadic); let mut inputs = sig.inputs(); let extra_args = if sig.abi == RustCall { |
