[clang] [CIR] Split RecordType into StructType/UnionType view classes; move union padding to dedicated field (PR #199790)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue May 26 15:48:20 PDT 2026
================
@@ -417,11 +436,11 @@ RecordType::getTypeSizeInBits(const mlir::DataLayout &dataLayout,
uint64_t
RecordType::getABIAlignment(const ::mlir::DataLayout &dataLayout,
::mlir::DataLayoutEntryListRef params) const {
- if (isUnion()) {
- mlir::Type largest = getLargestMember(dataLayout);
- if (!largest)
+ if (auto u = mlir::dyn_cast<cir::UnionType>(*this)) {
----------------
erichkeane wrote:
I would expect these to be a different overload, so UnionType::getABIAlignment/StrutType::getABIAlignment.
https://github.com/llvm/llvm-project/pull/199790
More information about the cfe-commits
mailing list