[Index] Add index support for cross import overlays.

Resolves rdar://problem/59445445
This commit is contained in:
Nathan Hawes
2020-03-25 10:04:41 -07:00
parent 1beb37e1b5
commit 8b03b05f1d
14 changed files with 195 additions and 30 deletions

View File

@@ -912,12 +912,9 @@ static bool passCursorInfoForDecl(SourceFile* SF,
if (SF) {
// In a source file we map the imported overlays to the underlying
// modules they shadow.
while (MD->getNameStr().startswith("_")) {
auto *Underlying = SF->getModuleShadowedBySeparatelyImportedOverlay(MD);
if (!Underlying)
break;
auto *Underlying = SF->getModuleShadowedBySeparatelyImportedOverlay(MD);
if (Underlying)
MD = Underlying;
}
} else if (MainModule) {
// In a module interface we need to map the declared overlays of the main
// module (which are included in its generated interface) back to the main