Skip to content

Commit a35298a

Browse files
committed
Address review feedback
1 parent 7f8e1e0 commit a35298a

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

clang/lib/CIR/CodeGen/CIRGenModule.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &mlirContext,
9595
// TODO(CIR): Should be updated once TypeSizeInfoAttr is upstreamed
9696
const unsigned sizeTypeSize =
9797
astContext.getTypeSize(astContext.getSignedSizeType());
98-
SizeSizeInBytes = astContext.toCharUnitsFromBits(sizeTypeSize).getQuantity();
98+
SizeAlignInBytes = astContext.toCharUnitsFromBits(sizeTypeSize).getQuantity();
9999
// In CIRGenTypeCache, UIntPtrTy and SizeType are fields of the same union
100100
UIntPtrTy =
101101
cir::IntType::get(&getMLIRContext(), sizeTypeSize, /*isSigned=*/false);

clang/lib/CIR/CodeGen/CIRGenTypeCache.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,8 @@ struct CIRGenTypeCache {
6666
unsigned char PointerSizeInBytes;
6767
};
6868

69-
/// The size and alignment of size_t.
70-
union {
71-
unsigned char SizeSizeInBytes; // sizeof(size_t)
72-
unsigned char SizeAlignInBytes;
73-
};
69+
/// The alignment of size_t.
70+
unsigned char SizeAlignInBytes;
7471

7572
clang::CharUnits getSizeAlign() const {
7673
return clang::CharUnits::fromQuantity(SizeAlignInBytes);

0 commit comments

Comments
 (0)