================
@@ -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
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to