[clang] [CIR] Update isSized with upstreamed types (PR #143960)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 24 06:43:48 PDT 2025


================
@@ -139,8 +139,9 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy {
   }
 
   bool isSized(mlir::Type ty) {
-    if (mlir::isa<cir::PointerType, cir::ArrayType, cir::BoolType,
-                  cir::IntType>(ty))
+    if (mlir::isa<cir::PointerType, cir::ArrayType, cir::BoolType, cir::IntType,
+                  cir::CIRFPTypeInterface, cir::ComplexType, cir::RecordType>(
----------------
erichkeane wrote:

It would be nice if we figured out a way to make patches that add new types 'check' here.  a `switch` on the `TypeID` is typically what we'd suggest in the FE, but of course that doesn't work here for a number of reasons.  Would be nice if someone thought of a way to make sure we didn't forget this again.

https://github.com/llvm/llvm-project/pull/143960


More information about the cfe-commits mailing list