IDE+Evaluator: refactor the implementation of two common IDE utilities to the evaluator model

These APIs are 'canDeclProvideDefaultImplementationFor' and 'collectAllOverriddenDecls'.
This commit is contained in:
Xi Ge
2019-07-18 18:14:02 -07:00
parent e5e469f330
commit 4d57590fa9
8 changed files with 183 additions and 64 deletions

View File

@@ -274,6 +274,8 @@ void SwiftLangSupport::indexSource(StringRef InputFile,
if (IsModuleIndexing) {
if (CI.setup(Invocation))
return;
// Indexing needs IDE requests
registerIDERequestFunctions(CI.getASTContext().evaluator);
bool IsClangModule = (FileExt == ".pcm");
if (IsClangModule) {
IdxConsumer.failed("Clang module files are not supported");
@@ -292,7 +294,8 @@ void SwiftLangSupport::indexSource(StringRef InputFile,
if (CI.setup(Invocation))
return;
// Indexing needs IDE requests
registerIDERequestFunctions(CI.getASTContext().evaluator);
trace::TracedOperation TracedOp(trace::OperationKind::IndexSource);
if (TracedOp.enabled()) {
trace::SwiftInvocation SwiftArgs;