mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user