IDE+Evaluator: refactor the implementation of two type checker utilities to evaluator requests. NFC

IDE functionality needs some internal type checking logics, e.g. checking
whether an extension is applicable to a concrete type. We used to directly
expose an header from sema called IDETypeChecking.h so that IDE functionalities
could invoke these APIs. The goal of the commit and following commits is to
expose evaluator requests instead of directly exposing function entry points from
sema so that we could later move IDETypeChecking.h to libIDE and implement these functions
by internally evaluating these requests.
This commit is contained in:
Xi Ge
2019-07-19 18:25:50 -07:00
parent be609e82ef
commit 77ba3a21b4
17 changed files with 264 additions and 49 deletions

View File

@@ -467,6 +467,7 @@ SwiftInterfaceGenContext::createForTypeInterface(CompilerInvocation Invocation,
ErrorMsg = "Error during invocation setup";
return nullptr;
}
registerIDETypeCheckRequestFunctions(CI.getASTContext().evaluator);
CI.performSema();
ASTContext &Ctx = CI.getASTContext();
CloseClangModuleFiles scopedCloseFiles(*Ctx.getClangModuleLoader());