Skip to content

Commit be75a58

Browse files
committed
Fix compilation
1 parent cc81c70 commit be75a58

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/abi.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use rustc_middle::ty::Ty;
99
use rustc_middle::ty::layout::LayoutOf;
1010
#[cfg(feature = "master")]
1111
use rustc_session::config;
12-
use rustc_target::abi::call::{ArgAttributes, CastTarget, FnAbi, PassMode};
12+
use rustc_target::callconv::{ArgAttributes, CastTarget, FnAbi, PassMode};
1313
#[cfg(feature = "master")]
1414
use rustc_target::callconv::Conv;
1515

@@ -239,7 +239,7 @@ impl<'gcc, 'tcx> FnAbiGccExt<'gcc, 'tcx> for FnAbi<'tcx, Ty<'tcx>> {
239239
}
240240

241241
#[cfg(feature = "master")]
242-
pub fn conv_to_fn_attribute<'gcc>(conv: Conv, _arch: &str) -> Option<FnAttribute<'gcc>> {
242+
pub fn conv_to_fn_attribute<'gcc>(conv: Conv, arch: &str) -> Option<FnAttribute<'gcc>> {
243243
// TODO: handle the calling conventions returning None.
244244
let attribute = match conv {
245245
Conv::C
@@ -250,20 +250,19 @@ pub fn conv_to_fn_attribute<'gcc>(conv: Conv, _arch: &str) -> Option<FnAttribute
250250
Conv::Cold => return None,
251251
Conv::PreserveMost => return None,
252252
Conv::PreserveAll => return None,
253-
/*Conv::GpuKernel => {
253+
Conv::GpuKernel => {
254254
if arch == "amdgpu" {
255255
return None
256256
} else if arch == "nvptx64" {
257257
return None
258258
} else {
259-
panic!("Architecture {arch} does not support GpuKernel calling convention");
259+
panic!("Architecture {} does not support GpuKernel calling convention", arch);
260260
}
261-
}*/
261+
}
262262
Conv::AvrInterrupt => return None,
263263
Conv::AvrNonBlockingInterrupt => return None,
264264
Conv::ArmAapcs => return None,
265265
Conv::Msp430Intr => return None,
266-
Conv::PtxKernel => return None,
267266
Conv::X86Fastcall => return None,
268267
Conv::X86Intr => return None,
269268
Conv::X86Stdcall => return None,

0 commit comments

Comments
 (0)