[serialization] Introduce 'FailedImportModule', which is used to track of when a module file failed to load (e.g. because of missing dependencies).

Swift SVN r8934
This commit is contained in:
Argyrios Kyrtzidis
2013-10-04 21:29:24 +00:00
parent 3e2f360e45
commit 963b6f0579
7 changed files with 110 additions and 75 deletions

View File

@@ -69,7 +69,9 @@ namespace swift {
TranslationUnit,
Builtin,
Serialized,
Clang
Clang,
/// A 'module' placeholder for failed imports.
FailedImport
};
/// Constants used to customize name lookup.
@@ -528,7 +530,8 @@ public:
static bool classof(const Module *M) {
return M->getKind() == ModuleKind::Serialized ||
M->getKind() == ModuleKind::Clang;
M->getKind() == ModuleKind::Clang ||
M->getKind() == ModuleKind::FailedImport;
}
static bool classof(const DeclContext *DC) {
return isa<Module>(DC) && classof(cast<Module>(DC));