SR-11889: Using Located<T> instead of std::pair<SourceLoc, T>

This commit is contained in:
Kita, Maksim
2019-12-08 22:51:48 +03:00
parent 06014e6226
commit b7cb3b67bf
38 changed files with 209 additions and 171 deletions

View File

@@ -778,7 +778,7 @@ ModuleDecl *CompilerInstance::importUnderlyingModule() {
ModuleDecl *objCModuleUnderlyingMixedFramework =
static_cast<ClangImporter *>(Context->getClangModuleLoader())
->loadModule(SourceLoc(),
std::make_pair(MainModule->getName(), SourceLoc()));
{{MainModule->getName(), SourceLoc()}});
if (objCModuleUnderlyingMixedFramework)
return objCModuleUnderlyingMixedFramework;
Diagnostics.diagnose(SourceLoc(), diag::error_underlying_module_not_found,
@@ -808,7 +808,7 @@ void CompilerInstance::getImplicitlyImportedModules(
if (Lexer::isIdentifier(ImplicitImportModuleName)) {
auto moduleID = Context->getIdentifier(ImplicitImportModuleName);
ModuleDecl *importModule =
Context->getModule(std::make_pair(moduleID, SourceLoc()));
Context->getModule({{moduleID, SourceLoc()}});
if (importModule) {
importModules.push_back(importModule);
} else {