REPL: Find completions from Clang modules.

Integrating Clang's FindVisibleDecls with Swift's by importing every decl created too much per-repl-entry compile time overhead, so as a workaround, just wire completions directly to FindVisibleDecls on the clang translation unit itself. Unfortunately this means we get completions for things Swift can't import yet, but it also means we don't have to wait 30 seconds to compile every entry after doing a completion.

Swift SVN r4061
This commit is contained in:
Joe Groff
2013-02-15 22:30:29 +00:00
parent deb3127a41
commit bd59da3e9e
5 changed files with 47 additions and 5 deletions

View File

@@ -279,7 +279,10 @@ void Module::lookupVisibleDecls(AccessPathTy AccessPath,
.lookupVisibleDecls(AccessPath, Consumer, LookupKind, *TU);
}
// TODO Delegate to Clang lookupVisibleDecls.
// TODO: Visit clang modules using Clang's Sema::LookupVisibleDecls.
// Importing every single Clang decl as a Swift decl currently makes
// everything horrendously slow.
return;
}