[AST] Completely replace Module with ModuleDecl

The typedef `swift::Module` was a temporary solution that allowed
`swift::Module` to be renamed to `swift::ModuleDecl` without requiring
every single callsite to be modified.

Modify all the callsites, and get rid of the typedef.
This commit is contained in:
Brian Gesiak
2017-01-07 17:06:35 -05:00
parent c0ecff1344
commit 663b92ece9
87 changed files with 561 additions and 562 deletions

View File

@@ -211,7 +211,7 @@ static Optional<VarDecl*> findFirstVariable(PatternBindingDecl *binding) {
void Mangler::mangleContext(const DeclContext *ctx) {
switch (ctx->getContextKind()) {
case DeclContextKind::Module:
return mangleModule(cast<Module>(ctx));
return mangleModule(cast<ModuleDecl>(ctx));
case DeclContextKind::FileUnit:
assert(!isa<BuiltinUnit>(ctx) && "mangling member of builtin module!");
@@ -335,7 +335,7 @@ void Mangler::mangleContext(const DeclContext *ctx) {
llvm_unreachable("bad decl context");
}
void Mangler::mangleModule(const Module *module) {
void Mangler::mangleModule(const ModuleDecl *module) {
assert(!module->getParent() && "cannot mangle nested modules!");
// Try the special 'swift' substitution.