@@ -4,8 +4,7 @@ use std::cmp;
44use libc:: c_uint;
55use rustc_abi as abi;
66pub ( 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 } ;
98use rustc_codegen_ssa:: MemFlags ;
109use rustc_codegen_ssa:: mir:: operand:: { OperandRef , OperandValue } ;
1110use rustc_codegen_ssa:: mir:: place:: { PlaceRef , PlaceValue } ;
@@ -440,7 +439,7 @@ impl<'ll, 'tcx> FnAbiLlvmExt<'ll, 'tcx> for FnAbi<'tcx, Ty<'tcx>> {
440439 let apply_range_attr = |idx : AttributePlace , scalar : rustc_abi:: Scalar | {
441440 if cx. sess ( ) . opts . optimize != config:: OptLevel :: No
442441 && llvm_util:: get_version ( ) >= ( 19 , 0 , 0 )
443- && matches ! ( scalar. primitive( ) , Int ( ..) )
442+ && matches ! ( scalar. primitive( ) , Primitive :: Int ( ..) )
444443 // If the value is a boolean, the range is 0..2 and that ultimately
445444 // become 0..0 when the type becomes i1, which would be rejected
446445 // by the LLVM verifier.
@@ -574,7 +573,7 @@ impl<'ll, 'tcx> FnAbiLlvmExt<'ll, 'tcx> for FnAbi<'tcx, Ty<'tcx>> {
574573 if bx. cx . sess ( ) . opts . optimize != config:: OptLevel :: No
575574 && llvm_util:: get_version ( ) < ( 19 , 0 , 0 )
576575 && let abi:: BackendRepr :: Scalar ( scalar) = self . ret . layout . backend_repr
577- && matches ! ( scalar. primitive( ) , Int ( ..) )
576+ && matches ! ( scalar. primitive( ) , Primitive :: Int ( ..) )
578577 // If the value is a boolean, the range is 0..2 and that ultimately
579578 // become 0..0 when the type becomes i1, which would be rejected
580579 // by the LLVM verifier.
0 commit comments