From b6628fdcb68715351589d3429768f53533b5435b Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 24 Mar 2015 02:49:55 +0000 Subject: [PATCH] [modules] More removal of unnecessary deserialization of lexical decls. Even if we have no external visible declarations, we may still have external lexical decls that lookup() would import to fill its lookup table. It's simpler and faster to always take the no-deserialization path through noload_lookup. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@233046 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AST/DeclBase.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp index 87d0b3912f..2f0fffea64 100644 --- a/lib/AST/DeclBase.cpp +++ b/lib/AST/DeclBase.cpp @@ -1389,8 +1389,6 @@ DeclContext::lookup_result DeclContext::noload_lookup(DeclarationName Name) { assert(DeclKind != Decl::LinkageSpec && "Should not perform lookups into linkage specs!"); - if (!hasExternalVisibleStorage()) - return lookup(Name); DeclContext *PrimaryContext = getPrimaryContext(); if (PrimaryContext != this) -- 2.40.0