mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[NFC] Add ASTContext::getModuleByIdentifier()
This is a reasonably common operation.
This commit is contained in:
@@ -447,8 +447,7 @@ ModuleImplicitImportsRequest::evaluate(Evaluator &evaluator,
|
||||
|
||||
// Add any modules we were asked to implicitly import.
|
||||
for (auto moduleName : importInfo.ModuleNames) {
|
||||
auto *importModule = ctx.getModule(
|
||||
ImportPath::Module::Builder(moduleName).get());
|
||||
auto *importModule = ctx.getModuleByIdentifier(moduleName);
|
||||
if (!importModule) {
|
||||
ctx.Diags.diagnose(SourceLoc(), diag::sema_no_import, moduleName.str());
|
||||
if (ctx.SearchPathOpts.SDKPath.empty() &&
|
||||
|
||||
Reference in New Issue
Block a user