diff options
| author | Antoni Boucher <bouanto@zoho.com> | 2025-04-13 07:48:56 -0400 |
|---|---|---|
| committer | Antoni Boucher <bouanto@zoho.com> | 2025-04-17 08:49:15 -0400 |
| commit | be75a58538154cbe901efea7807d7830d3d064c4 (patch) | |
| tree | e6c2020ec1581227706d4c5f80651d97d05fb592 /src | |
| parent | cc81c706e460c2d8a97a7006664136b62fd2c59e (diff) | |
| download | rust-be75a58538154cbe901efea7807d7830d3d064c4.tar.gz rust-be75a58538154cbe901efea7807d7830d3d064c4.zip | |
Fix compilation
Diffstat (limited to 'src')
| -rw-r--r-- | src/abi.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/abi.rs b/src/abi.rs index 1f522f64c9c..3b0ab9f0042 100644 --- a/src/abi.rs +++ b/src/abi.rs @@ -9,7 +9,7 @@ use rustc_middle::ty::Ty; use rustc_middle::ty::layout::LayoutOf; #[cfg(feature = "master")] use rustc_session::config; -use rustc_target::abi::call::{ArgAttributes, CastTarget, FnAbi, PassMode}; +use rustc_target::callconv::{ArgAttributes, CastTarget, FnAbi, PassMode}; #[cfg(feature = "master")] use rustc_target::callconv::Conv; @@ -239,7 +239,7 @@ impl<'gcc, 'tcx> FnAbiGccExt<'gcc, 'tcx> for FnAbi<'tcx, Ty<'tcx>> { } #[cfg(feature = "master")] -pub fn conv_to_fn_attribute<'gcc>(conv: Conv, _arch: &str) -> Option<FnAttribute<'gcc>> { +pub fn conv_to_fn_attribute<'gcc>(conv: Conv, arch: &str) -> Option<FnAttribute<'gcc>> { // TODO: handle the calling conventions returning None. let attribute = match conv { Conv::C @@ -250,20 +250,19 @@ pub fn conv_to_fn_attribute<'gcc>(conv: Conv, _arch: &str) -> Option<FnAttribute Conv::Cold => return None, Conv::PreserveMost => return None, Conv::PreserveAll => return None, - /*Conv::GpuKernel => { + Conv::GpuKernel => { if arch == "amdgpu" { return None } else if arch == "nvptx64" { return None } else { - panic!("Architecture {arch} does not support GpuKernel calling convention"); + panic!("Architecture {} does not support GpuKernel calling convention", arch); } - }*/ + } Conv::AvrInterrupt => return None, Conv::AvrNonBlockingInterrupt => return None, Conv::ArmAapcs => return None, Conv::Msp430Intr => return None, - Conv::PtxKernel => return None, Conv::X86Fastcall => return None, Conv::X86Intr => return None, Conv::X86Stdcall => return None, |
