mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +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:
@@ -75,7 +75,7 @@ public:
|
||||
CompilerInvocation Invocation;
|
||||
PrintingDiagnosticConsumer DiagConsumer;
|
||||
CompilerInstance Instance;
|
||||
Module *Mod = nullptr;
|
||||
ModuleDecl *Mod = nullptr;
|
||||
SourceTextInfo Info;
|
||||
// This is the non-typechecked AST for the generated interface source.
|
||||
CompilerInstance TextCI;
|
||||
@@ -90,7 +90,7 @@ typedef SwiftInterfaceGenContext::Implementation::TextReference TextReference;
|
||||
typedef SwiftInterfaceGenContext::Implementation::TextDecl TextDecl;
|
||||
typedef SwiftInterfaceGenContext::Implementation::SourceTextInfo SourceTextInfo;
|
||||
|
||||
static Module *getModuleByFullName(ASTContext &Ctx, StringRef ModuleName) {
|
||||
static ModuleDecl *getModuleByFullName(ASTContext &Ctx, StringRef ModuleName) {
|
||||
SmallVector<std::pair<Identifier, SourceLoc>, 4>
|
||||
AccessPath;
|
||||
while (!ModuleName.empty()) {
|
||||
@@ -101,7 +101,7 @@ static Module *getModuleByFullName(ASTContext &Ctx, StringRef ModuleName) {
|
||||
return Ctx.getModule(AccessPath);
|
||||
}
|
||||
|
||||
static Module *getModuleByFullName(ASTContext &Ctx, Identifier ModuleName) {
|
||||
static ModuleDecl *getModuleByFullName(ASTContext &Ctx, Identifier ModuleName) {
|
||||
return Ctx.getModule(std::make_pair(ModuleName, SourceLoc()));
|
||||
}
|
||||
|
||||
@@ -281,7 +281,7 @@ static bool getModuleInterfaceInfo(ASTContext &Ctx,
|
||||
std::string &ErrMsg,
|
||||
bool SynthesizedExtensions,
|
||||
Optional<StringRef> InterestedUSR) {
|
||||
Module *&Mod = Impl.Mod;
|
||||
ModuleDecl *&Mod = Impl.Mod;
|
||||
SourceTextInfo &Info = Impl.Info;
|
||||
|
||||
if (ModuleName.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user