]> granicus.if.org Git - clang/commitdiff
Don't emit name-lookup tables for functions or methods in the PCH files
authorDouglas Gregor <dgregor@apple.com>
Sat, 18 Apr 2009 15:49:20 +0000 (15:49 +0000)
committerDouglas Gregor <dgregor@apple.com>
Sat, 18 Apr 2009 15:49:20 +0000 (15:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69449 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/PCHWriter.cpp

index db9a1cebe569e62063b9e4f58f294819c1e02601..1efe70f270feaef5d7995eef2797a7e50b97b5d5 100644 (file)
@@ -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());