diff --git a/clang/include/clang/Frontend/PCHReader.h b/clang/include/clang/Frontend/PCHReader.h index fed169354eb8..07f2bb260f6e 100644 --- a/clang/include/clang/Frontend/PCHReader.h +++ b/clang/include/clang/Frontend/PCHReader.h @@ -116,7 +116,7 @@ private: /// \brief Offset of each type within the bitstream, indexed by the /// type ID, or the representation of a Type*. - const uint64_t *TypeOffsets; + const uint32_t *TypeOffsets; /// \brief Types that have already been loaded from the PCH file. /// @@ -126,7 +126,7 @@ private: /// \brief Offset of each declaration within the bitstream, indexed /// by the declaration ID (-1). - const uint64_t *DeclOffsets; + const uint32_t *DeclOffsets; /// \brief Declarations that have already been loaded from the PCH file. /// diff --git a/clang/include/clang/Frontend/PCHWriter.h b/clang/include/clang/Frontend/PCHWriter.h index 4d1262223ebf..96c6c79de444 100644 --- a/clang/include/clang/Frontend/PCHWriter.h +++ b/clang/include/clang/Frontend/PCHWriter.h @@ -64,7 +64,7 @@ private: /// \brief Offset of each declaration in the bitstream, indexed by /// the declaration's ID. - llvm::SmallVector DeclOffsets; + std::vector DeclOffsets; /// \brief Queue containing the declarations that we still need to /// emit. @@ -81,7 +81,7 @@ private: /// \brief Offset of each type in the bitstream, indexed by /// the type's ID. - llvm::SmallVector TypeOffsets; + std::vector TypeOffsets; /// \brief The type ID that will be assigned to the next new type. pch::TypeID NextTypeID; diff --git a/clang/lib/Frontend/PCHReader.cpp b/clang/lib/Frontend/PCHReader.cpp index bace23ccc622..f26cd84f8d5e 100644 --- a/clang/lib/Frontend/PCHReader.cpp +++ b/clang/lib/Frontend/PCHReader.cpp @@ -793,7 +793,7 @@ PCHReader::ReadPCHBlock() { Error("Duplicate TYPE_OFFSET record in PCH file"); return Failure; } - TypeOffsets = (const uint64_t *)BlobStart; + TypeOffsets = (const uint32_t *)BlobStart; TypesLoaded.resize(Record[0]); break; @@ -802,7 +802,7 @@ PCHReader::ReadPCHBlock() { Error("Duplicate DECL_OFFSET record in PCH file"); return Failure; } - DeclOffsets = (const uint64_t *)BlobStart; + DeclOffsets = (const uint32_t *)BlobStart; DeclsLoaded.resize(Record[0]); break; diff --git a/clang/lib/Frontend/PCHWriter.cpp b/clang/lib/Frontend/PCHWriter.cpp index bb72f78546d1..82eb5dffe435 100644 --- a/clang/lib/Frontend/PCHWriter.cpp +++ b/clang/lib/Frontend/PCHWriter.cpp @@ -1565,7 +1565,7 @@ void PCHWriter::WritePCH(Sema &SemaRef) { Record.push_back(TypeOffsets.size()); Stream.EmitRecordWithBlob(TypeOffsetAbbrev, Record, (const char *)&TypeOffsets.front(), - TypeOffsets.size() * sizeof(uint64_t)); + TypeOffsets.size() * sizeof(TypeOffsets[0])); // Write the declaration offsets array Abbrev = new BitCodeAbbrev(); @@ -1578,7 +1578,7 @@ void PCHWriter::WritePCH(Sema &SemaRef) { Record.push_back(DeclOffsets.size()); Stream.EmitRecordWithBlob(DeclOffsetAbbrev, Record, (const char *)&DeclOffsets.front(), - DeclOffsets.size() * sizeof(uint64_t)); + DeclOffsets.size() * sizeof(DeclOffsets[0])); // Write the record of special types. Record.clear();