aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/PCHWriter.cpp
diff options
context:
space:
mode:
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());