[clang] [CodeGen] Support arrays with initializers of 64-bit size (PR #92473)
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Thu May 16 22:31:41 PDT 2024
================
@@ -949,11 +949,11 @@ tryEmitGlobalCompoundLiteral(ConstantEmitter &emitter,
static llvm::Constant *
EmitArrayConstant(CodeGenModule &CGM, llvm::ArrayType *DesiredType,
- llvm::Type *CommonElementType, unsigned ArrayBound,
+ llvm::Type *CommonElementType, uint64_t ArrayBound,
SmallVectorImpl<llvm::Constant *> &Elements,
llvm::Constant *Filler) {
// Figure out how long the initial prefix of non-zero elements is.
- unsigned NonzeroLength = ArrayBound;
+ uint64_t NonzeroLength = ArrayBound;
if (Elements.size() < NonzeroLength && Filler->isNullValue())
NonzeroLength = Elements.size();
if (NonzeroLength == Elements.size()) {
----------------
MaskRay wrote:
Thanks for catching this. Fixed and added a test.
https://github.com/llvm/llvm-project/pull/92473
More information about the cfe-commits
mailing list