summaryrefslogtreecommitdiffstats
path: root/clang/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
commit13d190ffbcae42b1c7d372d96596920820799240 (patch)
treeaf0b2e1ecec56572478cba814fd11b901c066c9f /clang/lib/Frontend/PCHWriter.cpp
parentf21701b70cc9e88ca962827bf02b1fddb9ec6cd6 (diff)
downloadbcm5719-llvm-13d190ffbcae42b1c7d372d96596920820799240.tar.gz
bcm5719-llvm-13d190ffbcae42b1c7d372d96596920820799240.zip
Don't emit name-lookup tables for functions or methods in the PCH files
llvm-svn: 69449
Diffstat (limited to 'clang/lib/Frontend/PCHWriter.cpp')
-rw-r--r--clang/lib/Frontend/PCHWriter.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Frontend/PCHWriter.cpp b/clang/lib/Frontend/PCHWriter.cpp
index db9a1cebe56..1efe70f270f 100644
--- a/clang/lib/Frontend/PCHWriter.cpp
+++ b/clang/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());
OpenPOWER on IntegriCloud