diff options
Diffstat (limited to 'clang/lib/Frontend/PCHWriter.cpp')
-rw-r--r-- | clang/lib/Frontend/PCHWriter.cpp | 5 |
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()); |