[clang] [CodeGen] Support arrays with initializers of 64-bit size (PR #92473)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Thu May 16 17:55:04 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()) {
----------------
efriedma-quic wrote:

Do we also need to fix the type of `TrailingZeroes`?

https://github.com/llvm/llvm-project/pull/92473


More information about the cfe-commits mailing list