mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
SR-11889: Using Located<T> instead of std::pair<SourceLoc, T>
This commit is contained in:
@@ -68,7 +68,7 @@ bool swift::emitImportedModules(ASTContext &Context, ModuleDecl *mainModule,
|
||||
|
||||
auto accessPath = ID->getModulePath();
|
||||
// only the top-level name is needed (i.e. A in A.B.C)
|
||||
Modules.insert(accessPath[0].first.str());
|
||||
Modules.insert(accessPath[0].item.str());
|
||||
}
|
||||
|
||||
// And now look in the C code we're possibly using.
|
||||
@@ -98,8 +98,7 @@ bool swift::emitImportedModules(ASTContext &Context, ModuleDecl *mainModule,
|
||||
}
|
||||
|
||||
if (opts.ImportUnderlyingModule) {
|
||||
auto underlyingModule = clangImporter->loadModule(
|
||||
SourceLoc(), std::make_pair(mainModule->getName(), SourceLoc()));
|
||||
auto underlyingModule = clangImporter->loadModule(SourceLoc(), {{ mainModule->getName(), SourceLoc() }});
|
||||
if (!underlyingModule) {
|
||||
Context.Diags.diagnose(SourceLoc(),
|
||||
diag::error_underlying_module_not_found,
|
||||
|
||||
Reference in New Issue
Block a user