@@ -615,20 +615,20 @@ void CIRRecordLowering::determinePacked(bool nvBaseType) {
615615 continue ;
616616 // If any member falls at an offset that it not a multiple of its alignment,
617617 // then the entire record must be packed.
618- if (member.offset % getAlignment (member.data ))
618+ if (! member.offset . isMultipleOf ( getAlignment (member.data ) ))
619619 packed = true ;
620620 if (member.offset < nvSize)
621621 nvAlignment = std::max (nvAlignment, getAlignment (member.data ));
622622 alignment = std::max (alignment, getAlignment (member.data ));
623623 }
624624 // If the size of the record (the capstone's offset) is not a multiple of the
625625 // record's alignment, it must be packed.
626- if (members.back ().offset % alignment)
626+ if (! members.back ().offset . isMultipleOf ( alignment) )
627627 packed = true ;
628628 // If the non-virtual sub-object is not a multiple of the non-virtual
629629 // sub-object's alignment, it must be packed. We cannot have a packed
630630 // non-virtual sub-object and an unpacked complete object or vise versa.
631- if (nvSize % nvAlignment)
631+ if (! nvSize. isMultipleOf ( nvAlignment) )
632632 packed = true ;
633633 // Update the alignment of the sentinel.
634634 if (!packed)
@@ -824,7 +824,7 @@ void CIRRecordLowering::lowerUnion() {
824824 appendPaddingBytes (layoutSize - getSize (storageType));
825825
826826 // Set packed if we need it.
827- if (layoutSize % getAlignment (storageType))
827+ if (! layoutSize. isMultipleOf ( getAlignment (storageType) ))
828828 packed = true ;
829829}
830830
0 commit comments