Add location to the sema_no_import_target diagnostic

Thsi diagnostic currently emits, for example:
```
could not find module Foo for target arm64; found: x86_64
```
It is sometimes very useful to know where exactly the `found` module is located, so this PR changes this diagnostic to emit:
```
could not find module Foo for target arm64; found: x86_64, at:
<Path where Foo.swiftmodule/x86_64.swiftmodule is located>
```
This commit is contained in:
Artem Chikin
2021-04-08 13:44:34 -07:00
parent 4e0c6f99b8
commit 0445336adf
4 changed files with 5 additions and 5 deletions

View File

@@ -496,7 +496,7 @@ bool ImplicitSerializedModuleLoader::maybeDiagnoseTargetMismatch(
}
Ctx.Diags.diagnose(sourceLocation, diag::sema_no_import_target, moduleName,
target, foundArchs);
target, foundArchs, dir);
return true;
}