Author: Andy Kaylor Date: 2025-10-01T13:20:59-07:00 New Revision: 9a30ada53d5ef8d651c75795af2f6e9c48a1eecb
URL: https://github.com/llvm/llvm-project/commit/9a30ada53d5ef8d651c75795af2f6e9c48a1eecb DIFF: https://github.com/llvm/llvm-project/commit/9a30ada53d5ef8d651c75795af2f6e9c48a1eecb.diff LOG: [CIR][NFC] Fix CIR build (#161577) This fixes the CIR build after recent changes to CharUnits. Added: Modified: clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp Removed: ################################################################################ diff --git a/clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp b/clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp index a7628816089d0..bf812c8a1793b 100644 --- a/clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp +++ b/clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp @@ -615,7 +615,7 @@ void CIRRecordLowering::determinePacked(bool nvBaseType) { continue; // If any member falls at an offset that it not a multiple of its alignment, // then the entire record must be packed. - if (member.offset % getAlignment(member.data)) + if (!member.offset.isMultipleOf(getAlignment(member.data))) packed = true; if (member.offset < nvSize) nvAlignment = std::max(nvAlignment, getAlignment(member.data)); @@ -623,12 +623,12 @@ void CIRRecordLowering::determinePacked(bool nvBaseType) { } // If the size of the record (the capstone's offset) is not a multiple of the // record's alignment, it must be packed. - if (members.back().offset % alignment) + if (!members.back().offset.isMultipleOf(alignment)) packed = true; // If the non-virtual sub-object is not a multiple of the non-virtual // sub-object's alignment, it must be packed. We cannot have a packed // non-virtual sub-object and an unpacked complete object or vise versa. - if (nvSize % nvAlignment) + if (!nvSize.isMultipleOf(nvAlignment)) packed = true; // Update the alignment of the sentinel. if (!packed) _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
