summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PCHWriter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-27 19:01:47 +0000
committerChris Lattner <sabre@nondot.org>2009-04-27 19:01:47 +0000
commit12d61d3253f550d2013863e2f7f1d2a53c5ea0b0 (patch)
tree4f8385651167b96dbec2396ce3455abd5e4f179e /clang/lib/Frontend/PCHWriter.cpp
parent988e627f8c802af7631ad23262cc507b5ebe0dd7 (diff)
downloadbcm5719-llvm-12d61d3253f550d2013863e2f7f1d2a53c5ea0b0.tar.gz
bcm5719-llvm-12d61d3253f550d2013863e2f7f1d2a53c5ea0b0.zip
shrink SOURCE_LOCATION_OFFSETS to use 4-byte entries instead of 8-byte
entries, shaving 100K off the PCH file for cocoa. llvm-svn: 70228
Diffstat (limited to 'clang/lib/Frontend/PCHWriter.cpp')
-rw-r--r--clang/lib/Frontend/PCHWriter.cpp4
1 files changed, 2 insertions, 2 deletions
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