summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Frontend')
-rw-r--r--clang/lib/Frontend/PCHReader.cpp2
-rw-r--r--clang/lib/Frontend/PCHWriter.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Frontend/PCHReader.cpp b/clang/lib/Frontend/PCHReader.cpp
index f87252a8992..1b26b72c5ec 100644
--- a/clang/lib/Frontend/PCHReader.cpp
+++ b/clang/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/clang/lib/Frontend/PCHWriter.cpp b/clang/lib/Frontend/PCHWriter.cpp
index f0dd43ae8a1..d8603dfb699 100644
--- a/clang/lib/Frontend/PCHWriter.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud