@@ -2773,7 +2773,7 @@ void ModuleBitcodeWriter::writeConstants(unsigned FirstVal, unsigned LastVal,
27732773 cast<ConstantDataSequential>(C)->isString ()) {
27742774 const ConstantDataSequential *Str = cast<ConstantDataSequential>(C);
27752775 // Emit constant strings specially.
2776- unsigned NumElts = Str->getNumElements ();
2776+ uint64_t NumElts = Str->getNumElements ();
27772777 // If this is a null-terminated string, use the denser CSTRING encoding.
27782778 if (Str->isCString ()) {
27792779 Code = bitc::CST_CODE_CSTRING;
@@ -2784,7 +2784,7 @@ void ModuleBitcodeWriter::writeConstants(unsigned FirstVal, unsigned LastVal,
27842784 }
27852785 bool isCStr7 = Code == bitc::CST_CODE_CSTRING;
27862786 bool isCStrChar6 = Code == bitc::CST_CODE_CSTRING;
2787- for (unsigned i = 0 ; i != NumElts; ++i) {
2787+ for (uint64_t i = 0 ; i != NumElts; ++i) {
27882788 unsigned char V = Str->getElementAsInteger (i);
27892789 Record.push_back (V);
27902790 isCStr7 &= (V & 128 ) == 0 ;
@@ -2801,10 +2801,10 @@ void ModuleBitcodeWriter::writeConstants(unsigned FirstVal, unsigned LastVal,
28012801 Code = bitc::CST_CODE_DATA;
28022802 Type *EltTy = CDS->getElementType ();
28032803 if (isa<IntegerType>(EltTy)) {
2804- for (unsigned i = 0 , e = CDS->getNumElements (); i != e; ++i)
2804+ for (uint64_t i = 0 , e = CDS->getNumElements (); i != e; ++i)
28052805 Record.push_back (CDS->getElementAsInteger (i));
28062806 } else {
2807- for (unsigned i = 0 , e = CDS->getNumElements (); i != e; ++i)
2807+ for (uint64_t i = 0 , e = CDS->getNumElements (); i != e; ++i)
28082808 Record.push_back (
28092809 CDS->getElementAsAPFloat (i).bitcastToAPInt ().getLimitedValue ());
28102810 }
0 commit comments