aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/Frontend/PCHReader.h2
-rw-r--r--lib/Frontend/PCHReader.cpp2
-rw-r--r--lib/Frontend/PCHWriter.cpp4
3 files changed, 4 insertions, 4 deletions
diff --git a/include/clang/Frontend/PCHReader.h b/include/clang/Frontend/PCHReader.h
index a955b80695..52f58f8511 100644
--- a/include/clang/Frontend/PCHReader.h
+++ b/include/clang/Frontend/PCHReader.h
@@ -106,7 +106,7 @@ private:
/// \brief Offset type for all of the source location entries in the
/// PCH file.
- const uint64_t *SLocOffsets;
+ const uint32_t *SLocOffsets;
/// \brief The number of source location entries in the PCH file.
unsigned TotalNumSLocEntries;
diff --git a/lib/Frontend/PCHReader.cpp b/lib/Frontend/PCHReader.cpp
index f87252a899..1b26b72c5e 100644
--- a/lib/Frontend/PCHReader.cpp
+++ b/lib/Frontend/PCHReader.cpp
@@ -1017,7 +1017,7 @@ PCHReader::ReadPCHBlock() {
break;
case pch::SOURCE_LOCATION_OFFSETS:
- SLocOffsets = (const uint64_t *)BlobStart;
+ SLocOffsets = (const uint32_t *)BlobStart;
TotalNumSLocEntries = Record[0];
PP.getSourceManager().PreallocateSLocEntries(this,
TotalNumSLocEntries,
diff --git a/lib/Frontend/PCHWriter.cpp b/lib/Frontend/PCHWriter.cpp
index f0dd43ae8a..d8603dfb69 100644
--- a/lib/Frontend/PCHWriter.cpp
+++ b/lib/Frontend/PCHWriter.cpp
@@ -738,7 +738,7 @@ void PCHWriter::WriteSourceManagerBlock(SourceManager &SourceMgr,
// Write out the source location entry table. We skip the first
// entry, which is always the same dummy entry.
- std::vector<uint64_t> SLocEntryOffsets;
+ std::vector<uint32_t> SLocEntryOffsets;
RecordData PreloadSLocs;
SLocEntryOffsets.reserve(SourceMgr.sloc_entry_size() - 1);
for (SourceManager::sloc_entry_iterator
@@ -836,7 +836,7 @@ void PCHWriter::WriteSourceManagerBlock(SourceManager &SourceMgr,
Record.push_back(SourceMgr.getNextOffset());
Stream.EmitRecordWithBlob(SLocOffsetsAbbrev, Record,
(const char *)&SLocEntryOffsets.front(),
- SLocEntryOffsets.size() * 8);
+ SLocEntryOffsets.size()*sizeof(SLocEntryOffsets[0]));
// Write the source location entry preloads array, telling the PCH
// reader which source locations entries it should load eagerly.