@@ -4,8 +4,7 @@ use std::cmp;
4
4
use libc:: c_uint;
5
5
use rustc_abi as abi;
6
6
pub ( crate ) use rustc_abi:: ExternAbi ;
7
- use rustc_abi:: Primitive :: Int ;
8
- use rustc_abi:: { HasDataLayout , Size } ;
7
+ use rustc_abi:: { HasDataLayout , Primitive , Reg , RegKind , Size } ;
9
8
use rustc_codegen_ssa:: MemFlags ;
10
9
use rustc_codegen_ssa:: mir:: operand:: { OperandRef , OperandValue } ;
11
10
use rustc_codegen_ssa:: mir:: place:: { PlaceRef , PlaceValue } ;
@@ -440,7 +439,7 @@ impl<'ll, 'tcx> FnAbiLlvmExt<'ll, 'tcx> for FnAbi<'tcx, Ty<'tcx>> {
440
439
let apply_range_attr = |idx : AttributePlace , scalar : rustc_abi:: Scalar | {
441
440
if cx. sess ( ) . opts . optimize != config:: OptLevel :: No
442
441
&& llvm_util:: get_version ( ) >= ( 19 , 0 , 0 )
443
- && matches ! ( scalar. primitive( ) , Int ( ..) )
442
+ && matches ! ( scalar. primitive( ) , Primitive :: Int ( ..) )
444
443
// If the value is a boolean, the range is 0..2 and that ultimately
445
444
// become 0..0 when the type becomes i1, which would be rejected
446
445
// by the LLVM verifier.
@@ -574,7 +573,7 @@ impl<'ll, 'tcx> FnAbiLlvmExt<'ll, 'tcx> for FnAbi<'tcx, Ty<'tcx>> {
574
573
if bx. cx . sess ( ) . opts . optimize != config:: OptLevel :: No
575
574
&& llvm_util:: get_version ( ) < ( 19 , 0 , 0 )
576
575
&& let abi:: BackendRepr :: Scalar ( scalar) = self . ret . layout . backend_repr
577
- && matches ! ( scalar. primitive( ) , Int ( ..) )
576
+ && matches ! ( scalar. primitive( ) , Primitive :: Int ( ..) )
578
577
// If the value is a boolean, the range is 0..2 and that ultimately
579
578
// become 0..0 when the type becomes i1, which would be rejected
580
579
// by the LLVM verifier.
0 commit comments