Merge remote-tracking branch 'origin/master' into master-next

This commit is contained in:
swift-ci
2019-08-19 21:30:00 -07:00
30 changed files with 192 additions and 207 deletions

View File

@@ -454,8 +454,11 @@ static bool isParsedModule(const ModuleDecl *mod) {
void ModuleDecl::lookupValue(AccessPathTy AccessPath, DeclName Name,
NLKind LookupKind,
SmallVectorImpl<ValueDecl*> &Result) const {
auto *stats = getASTContext().Stats;
if (stats)
stats->getFrontendCounters().NumModuleLookupValue++;
if (isParsedModule(this)) {
FrontendStatsTracer tracer(getASTContext().Stats, "source-file-lookup-value");
getSourceLookupCache().lookupValue(AccessPath, Name, LookupKind, Result);
return;
}
@@ -604,6 +607,10 @@ void SourceFile::lookupClassMembers(ModuleDecl::AccessPathTy accessPath,
void ModuleDecl::lookupClassMember(AccessPathTy accessPath,
DeclName name,
SmallVectorImpl<ValueDecl*> &results) const {
auto *stats = getASTContext().Stats;
if (stats)
stats->getFrontendCounters().NumModuleLookupClassMember++;
if (isParsedModule(this)) {
FrontendStatsTracer tracer(getASTContext().Stats, "source-file-lookup-class-member");
auto &cache = getSourceLookupCache();