summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PCHWriter.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-04-25 20:26:24 +0000
committerDouglas Gregor <dgregor@apple.com>2009-04-25 20:26:24 +0000
commit6b7bf5a771c7a1d6abb37a7bdc48840b9ff7dbae (patch)
tree4168a39aad310608af52f10e3282cdbff5f153b0 /clang/lib/Frontend/PCHWriter.cpp
parent518bd14f2deedf92c96f5fc4b4c61e49eaadb16e (diff)
downloadbcm5719-llvm-6b7bf5a771c7a1d6abb37a7bdc48840b9ff7dbae.tar.gz
bcm5719-llvm-6b7bf5a771c7a1d6abb37a7bdc48840b9ff7dbae.zip
Revert my changes that try to avoid creating StringMap entries for
identifiers. They don't yet work, but will inhibit future optimizations. llvm-svn: 70071
Diffstat (limited to 'clang/lib/Frontend/PCHWriter.cpp')
-rw-r--r--clang/lib/Frontend/PCHWriter.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/clang/lib/Frontend/PCHWriter.cpp b/clang/lib/Frontend/PCHWriter.cpp
index 7eb398c1663..4ac836419eb 100644
--- a/clang/lib/Frontend/PCHWriter.cpp
+++ b/clang/lib/Frontend/PCHWriter.cpp
@@ -2013,6 +2013,7 @@ public:
EmitKeyDataLength(llvm::raw_ostream& Out, const IdentifierInfo* II,
pch::IdentID ID) {
unsigned KeyLen = strlen(II->getName()) + 1;
+ clang::io::Emit16(Out, KeyLen);
unsigned DataLen = 4 + 4; // 4 bytes for token ID, builtin, flags
// 4 bytes for the persistent ID
if (II->hasMacroDefinition() &&
@@ -2022,14 +2023,7 @@ public:
DEnd = IdentifierResolver::end();
D != DEnd; ++D)
DataLen += sizeof(pch::DeclID);
-
- // We emit the data length before the key length, because we want
- // the key length to immediately precede the actual string
- // data. This is so that our identifier length + key layout
- // matches that of the identifier hash table for pretokenized
- // headers.
clang::io::Emit16(Out, DataLen);
- clang::io::Emit16(Out, KeyLen);
return std::make_pair(KeyLen, DataLen);
}
OpenPOWER on IntegriCloud