[clang] 71365c0 - [CIR][NFC] Fix CIR build after CharUnits change (#161580)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 1 13:34:31 PDT 2025
Author: Andy Kaylor
Date: 2025-10-01T13:34:27-07:00
New Revision: 71365c0b6b95eb6874b08f32fe58b5419979ff4c
URL: https://github.com/llvm/llvm-project/commit/71365c0b6b95eb6874b08f32fe58b5419979ff4c
DIFF: https://github.com/llvm/llvm-project/commit/71365c0b6b95eb6874b08f32fe58b5419979ff4c.diff
LOG: [CIR][NFC] Fix CIR build after CharUnits change (#161580)
My previous attempt to fix this missed one case.
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 bf812c8a1793b..2baeb43c48b2e 100644
--- a/clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenRecordLayoutBuilder.cpp
@@ -824,7 +824,7 @@ void CIRRecordLowering::lowerUnion() {
appendPaddingBytes(layoutSize - getSize(storageType));
// Set packed if we need it.
- if (layoutSize % getAlignment(storageType))
+ if (!layoutSize.isMultipleOf(getAlignment(storageType)))
packed = true;
}
More information about the cfe-commits
mailing list