Commit Graph

2 Commits

Author SHA1 Message Date
Brent Royal-Gordon
bf074b093e Run some implicit imports through import resolution
Unloaded implicit imports (e.g. the `-import-module` flag) will now be processed by import resolution, and will be fully validated and cross-imported. Preloaded imports, like the standard library import, are still not run through full import resolution, but this is a definite improvement over the status quo.

This also folds `-import-underlying-module` and `@_exported import <ParentModule>` into a single code path, slightly changing the diagnostic for a failed overlay-style underlying module import.
2020-10-09 18:59:19 -07:00
Brent Royal-Gordon
f38474896d Fix layering of cross-import and clang overlays
If a clang module declares a cross-import overlay, but it also has a traditional overlay, we want the cross-import overlay to be registered with the SourceFile as sitting atop the traditional overlay. Otherwise module-qualified name lookups will bypass the cross-import overlay.

Fixes rdar://62139656.
2020-04-21 23:43:53 -07:00