[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

@@ -30,11 +30,11 @@ using namespace swift;
using namespace Lowering;
class SILModule::SerializationCallback : public SerializedSILLoader::Callback {
void didDeserialize(Module *M, SILFunction *fn) override {
void didDeserialize(ModuleDecl *M, SILFunction *fn) override {
updateLinkage(fn);
}
void didDeserialize(Module *M, SILGlobalVariable *var) override {
void didDeserialize(ModuleDecl *M, SILGlobalVariable *var) override {
updateLinkage(var);
// For globals we currently do not support available_externally.
@@ -43,12 +43,12 @@ class SILModule::SerializationCallback : public SerializedSILLoader::Callback {
var->setDeclaration(true);
}
void didDeserialize(Module *M, SILVTable *vtable) override {
void didDeserialize(ModuleDecl *M, SILVTable *vtable) override {
// TODO: should vtables get linkage?
//updateLinkage(vtable);
}
void didDeserialize(Module *M, SILWitnessTable *wt) override {
void didDeserialize(ModuleDecl *M, SILWitnessTable *wt) override {
updateLinkage(wt);
}
@@ -75,7 +75,7 @@ class SILModule::SerializationCallback : public SerializedSILLoader::Callback {
}
};
SILModule::SILModule(Module *SwiftModule, SILOptions &Options,
SILModule::SILModule(ModuleDecl *SwiftModule, SILOptions &Options,
const DeclContext *associatedDC,
bool wholeModule)
: TheSwiftModule(SwiftModule), AssociatedDeclContext(associatedDC),