From 5f8e3302242cf94de2f8e46d10167f57fcf747c3 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Sat, 25 Apr 2009 20:26:24 +0000 Subject: Revert my changes that try to avoid creating StringMap entries for identifiers. They don't yet work, but will inhibit future optimizations. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70071 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Frontend/PCHWriter.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'lib/Frontend/PCHWriter.cpp') diff --git a/lib/Frontend/PCHWriter.cpp b/lib/Frontend/PCHWriter.cpp index 7eb398c166..4ac836419e 100644 --- a/lib/Frontend/PCHWriter.cpp +++ b/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); } -- cgit v1.2.3