[AST] Remove parsing ASTStages

Now that the parsing stage has been
requestified, these are no longer
meaningful.
This commit is contained in:
Hamish Knight
2020-02-11 15:34:58 -08:00
parent dafa9b96f3
commit df34be72e8
4 changed files with 13 additions and 13 deletions

View File

@@ -1192,7 +1192,14 @@ void ModuleDecl::getImportedModules(SmallVectorImpl<ImportedModule> &modules,
void
SourceFile::getImportedModules(SmallVectorImpl<ModuleDecl::ImportedModule> &modules,
ModuleDecl::ImportFilter filter) const {
assert(ASTStage >= Parsed || Kind == SourceFileKind::SIL);
// FIXME: Ideally we should assert that the file has been name bound before
// calling this function. However unfortunately that can cause issues for
// overlays which can depend on a Clang submodule for the underlying framework
// they are overlaying, which causes us to attempt to load the overlay again.
// We need to find a way to ensure that an overlay dependency with the same
// name as the overlay always loads the underlying Clang module. We currently
// handle this for a direct import from the overlay, but not when it happens
// through other imports.
assert(filter && "no imports requested?");
for (auto desc : Imports) {
ModuleDecl::ImportFilter requiredFilter;