Eliminated LookupCriteria, whose creation was causing a bottleneck for
LookupName et al. Instead, use an enum and a bool to describe its
contents.
Optimized the C/Objective-C path through LookupName, eliminating any
unnecessarily C++isms. Simplify IdentifierResolver::iterator, removing
some code and arguments that are no longer used.
Eliminated LookupDeclInScope/LookupDeclInContext, moving all callers
over to LookupName, LookupQualifiedName, or LookupParsedName, as
appropriate.
All together, I'm seeing a 0.2% speedup on Cocoa.h with PTH and
-disable-free. Plus, we're down to three name-lookup routines.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63354 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaInherit.h b/lib/Sema/SemaInherit.h
index 87a4a66..eb169a2 100644
--- a/lib/Sema/SemaInherit.h
+++ b/lib/Sema/SemaInherit.h
@@ -193,8 +193,9 @@
/// MemberLookupCriteria - Constructs member lookup criteria to
/// search for a class member with the given Name.
explicit MemberLookupCriteria(DeclarationName Name,
- Sema::LookupCriteria Criteria)
- : LookupBase(false), Name(Name), Criteria(Criteria) { }
+ Sema::LookupNameKind NameKind,
+ unsigned IDNS)
+ : LookupBase(false), Name(Name), NameKind(NameKind), IDNS(IDNS) { }
/// LookupBase - True if we are looking for a base class (whose
/// type is Base). If false, we are looking for a named member of
@@ -209,9 +210,8 @@
/// LookupBase is false.
DeclarationName Name;
- /// Criteria - The criteria by which we evaluate a named member,
- /// if LookupBase is false.
- Sema::LookupCriteria Criteria;
+ Sema::LookupNameKind NameKind;
+ unsigned IDNS;
};
}