[cfe-commits] r69739 - /cfe/trunk/lib/Frontend/PCHWriter.cpp
dgregor at apple.com
Tue Apr 21 15:32:34 PDT 2009
Date: Tue Apr 21 17:32:33 2009
New Revision: 69739
Don't bother writing a visible-declarations record for the translation
unit into the PCH file, since we won't be performing name lookup into
it anyway. Reduces the size of the Carbon.h PCH file by ~200k.
--- cfe/trunk/lib/Frontend/PCHWriter.cpp (original)
+++ cfe/trunk/lib/Frontend/PCHWriter.cpp Tue Apr 21 17:32:33 2009
@@ -1595,9 +1595,11 @@
if (DC->getPrimaryContext() != DC)
- // Since there is no name lookup into functions or methods, don't
- // bother to build a visible-declarations table.
- if (DC->isFunctionOrMethod())
+ // Since there is no name lookup into functions or methods, and we
+ // perform name lookup for the translation unit via the
+ // IdentifierInfo chains, don't bother to build a
+ // visible-declarations table for these entities.
+ if (DC->isFunctionOrMethod() || DC->isTranslationUnit())
// Force the DeclContext to build a its name-lookup table.
More information about the cfe-commits