summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/IdentifierTable.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-04-25 23:30:02 +0000
committerDouglas Gregor <dgregor@apple.com>2009-04-25 23:30:02 +0000
commit99734e76691de1011a4afc76e2aa183161a5aa1c (patch)
tree26909b19bb1972331e0831085b3bcd0d88288ca6 /clang/lib/Basic/IdentifierTable.cpp
parentc06ce0f71083f6bd5d9fd18dfb9a7abe382028e9 (diff)
downloadbcm5719-llvm-99734e76691de1011a4afc76e2aa183161a5aa1c.tar.gz
bcm5719-llvm-99734e76691de1011a4afc76e2aa183161a5aa1c.zip
Lazily load the controlling macros for all of the headers known in the
PCH file. In the Cocoa-prefixed "Hello, World" benchmark, this takes us from reading 503 identifiers down to 37 and from 470 macros down to 4. It also results in an 8% performance improvement. llvm-svn: 70094
Diffstat (limited to 'clang/lib/Basic/IdentifierTable.cpp')
-rw-r--r--clang/lib/Basic/IdentifierTable.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Basic/IdentifierTable.cpp b/clang/lib/Basic/IdentifierTable.cpp
index 344c4eb18dc..8b74b20032a 100644
--- a/clang/lib/Basic/IdentifierTable.cpp
+++ b/clang/lib/Basic/IdentifierTable.cpp
@@ -42,6 +42,8 @@ IdentifierInfo::IdentifierInfo() {
IdentifierInfoLookup::~IdentifierInfoLookup() {}
+ExternalIdentifierLookup::~ExternalIdentifierLookup() {}
+
IdentifierTable::IdentifierTable(const LangOptions &LangOpts,
IdentifierInfoLookup* externalLookup)
: HashTable(8192), // Start with space for 8K identifiers.
OpenPOWER on IntegriCloud