Skip to content

Commit

Permalink
There is no need for the Crawler to hold on to the name of the module…
Browse files Browse the repository at this point in the history
…, as a Crawler is only invoked when there is no real backing module to search into

Fixes rdar://24641858
  • Loading branch information
Enrico Granata committed Feb 17, 2016
1 parent 532d36d commit 2d42bcc
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions lib/IDE/ReconstructType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,13 +311,6 @@ class DeclsLookupSource {
}
return;
}
else
{
const bool allow_crawler = false;
if (!_crawler._module.empty())
GetDeclsLookupSource(*ast_ctx, ConstString(_crawler._module),
allow_crawler).lookupQualified(name, options, typeResolver, result);
}
}
}
else if (_type == Type::SwiftModule)
Expand Down Expand Up @@ -351,14 +344,6 @@ class DeclsLookupSource {
}
return;
}
else
{
const bool allow_crawler = false;
if (!_crawler._module.empty())
GetDeclsLookupSource(*ast_ctx, ConstString(_crawler._module),
allow_crawler).lookupValue(path, name, kind,
result);
}
}
}
else if (_type == Type::SwiftModule)
Expand Down Expand Up @@ -447,7 +432,6 @@ class DeclsLookupSource {
break;
case Type::Crawler:
_crawler._ast = rhs._crawler._ast;
_crawler._module = rhs._crawler._module;
break;
case Type::SwiftModule:
_module = rhs._module;
Expand Down Expand Up @@ -476,7 +460,6 @@ class DeclsLookupSource {
break;
case Type::Crawler:
_crawler._ast = rhs._crawler._ast;
_crawler._module = rhs._crawler._module;
break;
case Type::SwiftModule:
_module = rhs._module;
Expand Down Expand Up @@ -561,7 +544,6 @@ class DeclsLookupSource {
swift::ModuleDecl *_module;
struct {
swift::ASTContext* _ast;
std::string _module;
} _crawler;
swift::NominalTypeDecl *_decl;
struct {
Expand All @@ -588,7 +570,6 @@ class DeclsLookupSource {
if (_a)
{
_crawler._ast = _a;
_crawler._module = _m.data();
_type = Type::Crawler;
}
else
Expand Down

0 comments on commit 2d42bcc

Please sign in to comment.