================
@@ -72,9 +63,15 @@ mlir::Type CIRGenTypes::convertType(QualType type) {
   }
   case Type::BitInt: {
     const auto *bitIntTy = cast<BitIntType>(type);
-    resultType =
-        cir::IntType::get(cgm.getBuilder().getContext(), 
bitIntTy->getNumBits(),
-                          bitIntTy->isSigned());
+    if (bitIntTy->getNumBits() > cir::IntType::maxBitwidth()) {
+      cgm.errorNYI(SourceLocation(), "large _BitInt type", type);
+      resultType = cir::IntType::get(cgm.getBuilder().getContext(), 32,
----------------
erichkeane wrote:

I might suggest we recover by doing IntType::maxBitwidth.  WDYT?

https://github.com/llvm/llvm-project/pull/118743
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to