================
@@ -378,8 +378,12 @@ PointerType::getABIAlignment(const ::mlir::DataLayout
&dataLayout,
llvm::TypeSize
RecordType::getTypeSizeInBits(const mlir::DataLayout &dataLayout,
mlir::DataLayoutEntryListRef params) const {
- if (isUnion())
- return dataLayout.getTypeSize(getLargestMember(dataLayout));
+ if (isUnion()) {
+ mlir::Type largest = getLargestMember(dataLayout);
+ if (!largest)
+ return llvm::TypeSize::getFixed(0);
----------------
erichkeane wrote:
I'm looking at this for something else... why is the size of an empty union
'0'? I almost think this should be CHAR_BIT sized...
https://github.com/llvm/llvm-project/pull/191516
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits