================
@@ -240,6 +241,10 @@ static bool isSupportedType(mlir::Type ty, const 
DataLayout &dl) {
                       [&](mlir::Type m) { return isSupportedType(m, dl); }))
       return false;
     if (recTy.isUnion()) {
+      // The size query below reads the tail padding too.
+      if (mlir::Type padding = cast<cir::UnionType>(ty).getPadding();
----------------
xlauko wrote:

I checked. CIRGen only emits a char or an array of chars as union padding, so 
C/C++ can’t produce this. I only reached it in hand-written CIR. 

I agree rejecting it is than better, I dropped this condition and fixed 
UnionType verifier to accept only the real C/C++ produced padding.

https://github.com/llvm/llvm-project/pull/233897
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to