[clang] [CIR] Integral types; simple global variables (PR #118743)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 5 13:04:35 PST 2024
================
@@ -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
More information about the cfe-commits
mailing list