AST: loadNamedMembers() never fails

This allows us to simplify lookupDirect() a fair bit as well.
This commit is contained in:
Slava Pestov
2020-01-22 01:08:27 -05:00
parent d5cc01da0c
commit 0b502d8c84
7 changed files with 37 additions and 67 deletions

View File

@@ -81,10 +81,7 @@ public:
/// Populates a vector with all members of \p IDC that have DeclName
/// matching \p N.
///
/// Returns None if an error occurred \em or named member-lookup
/// was otherwise unsupported in this implementation or Decl.
virtual Optional<TinyPtrVector<ValueDecl *>>
virtual TinyPtrVector<ValueDecl *>
loadNamedMembers(const IterableDeclContext *IDC, DeclBaseName N,
uint64_t contextData) = 0;

View File

@@ -243,9 +243,6 @@ FRONTEND_STATISTIC(Sema, NumLazyIterableDeclContexts)
/// Number of member-name lookups that avoided loading all members.
FRONTEND_STATISTIC(Sema, NamedLazyMemberLoadSuccessCount)
/// Number of member-name lookups that wound up loading all members.
FRONTEND_STATISTIC(Sema, NamedLazyMemberLoadFailureCount)
/// Number of types deserialized.
FRONTEND_STATISTIC(Sema, NumTypesDeserialized)