aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/PCHWriter.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-04-18 15:49:20 +0000
committerDouglas Gregor <dgregor@apple.com>2009-04-18 15:49:20 +0000
commit58f06995ada075131ab9ac72a411450caaa65605 (patch)
tree0bd38f395d46c69c1a3a46253ac9950c1a4dd3c8 /lib/Frontend/PCHWriter.cpp
parent5aacb0edde33af5fe3b127e8b482fa2c2afcc68a (diff)
Don't emit name-lookup tables for functions or methods in the PCH files
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69449 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PCHWriter.cpp')
-rw-r--r--lib/Frontend/PCHWriter.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Frontend/PCHWriter.cpp b/lib/Frontend/PCHWriter.cpp
index db9a1cebe5..1efe70f270 100644
--- a/lib/Frontend/PCHWriter.cpp
+++ b/lib/Frontend/PCHWriter.cpp
@@ -1439,6 +1439,11 @@ uint64_t PCHWriter::WriteDeclContextVisibleBlock(ASTContext &Context,
if (DC->getPrimaryContext() != DC)
return 0;
+ // Since there is no name lookup into functions or methods, don't
+ // bother to build a visible-declarations table.
+ if (DC->isFunctionOrMethod())
+ return 0;
+
// Force the DeclContext to build a its name-lookup table.
DC->lookup(Context, DeclarationName());