================ @@ -1774,6 +1774,18 @@ llvm::Constant *ConstantEmitter::emitForMemory(CodeGenModule &CGM, return Res; } + if (const auto *BIT = destType->getAs<BitIntType>()) { + if (BIT->getNumBits() > 128) { + // Long _BitInt has array of bytes as in-memory type. + ConstantAggregateBuilder Builder(CGM); + llvm::Type *DesiredTy = CGM.getTypes().ConvertTypeForMem(destType); + auto *CI = cast<llvm::ConstantInt>(C); ---------------- Fznamznon wrote:
Well, it seems it doesn't depend on the size of _BitInt. Using something like `_SomeSplitBitIntType x = (unsigned long) &someVariable;` either fails if I for example apply `constexpr` or falls back on dynamic initialization. So I changed the comment to make it more generic. https://github.com/llvm/llvm-project/pull/91364 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits