mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Introduce a new ModuleKind enum to implement RTTI for module downcasting.
No functionality change. Swift SVN r8053
This commit is contained in:
@@ -386,13 +386,18 @@ public:
|
||||
SerializedModule(ASTContext &ctx, SerializedModuleLoader &owner,
|
||||
Identifier name, std::string DebugModuleName,
|
||||
Component *comp, ModuleFile *file)
|
||||
: LoadedModule(DeclContextKind::SerializedModule, name, DebugModuleName,
|
||||
: LoadedModule(DeclContextKind::SerializedModule,
|
||||
ModuleKind::SerializedModule, name, DebugModuleName,
|
||||
comp, ctx, owner),
|
||||
File(file) {}
|
||||
|
||||
static bool classof(const DeclContext *DC) {
|
||||
return DC->getContextKind() == DeclContextKind::SerializedModule;
|
||||
}
|
||||
|
||||
static bool classof(const Module *M) {
|
||||
return M->getKind() == ModuleKind::SerializedModule;
|
||||
}
|
||||
};
|
||||
|
||||
} // end namespace swift
|
||||
|
||||
Reference in New Issue
Block a user