================
@@ -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,
----------------
dkolsen-pgi wrote:

Compilation has failed at this point, so it doesn't really matter exactly what 
type is used.  I like the consistency of always returning `int` for 
not-yet-implemented types.  (That code will become simpler when aliases for the 
common CIR types are created.)


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