Track types that we perform qualified lookup on from the primary file.

We need to do this mainly to figure out when extensions can affect this file.
This is part of the intra-module dependency tracking work to implement
incremental rebuilds.

Part of rdar://problem/15353101

Swift SVN r22927
This commit is contained in:
Jordan Rose
2014-10-24 22:23:05 +00:00
parent 9afdd1bc2f
commit ca6639cf97
5 changed files with 77 additions and 6 deletions

View File

@@ -137,12 +137,27 @@ static bool emitReferenceDependencies(DiagnosticEngine &diags,
}
}
ReferencedNameTracker *tracker = SF->getReferencedNameTracker();
// FIXME: Sort these?
out << "top-level:\n";
for (Identifier name : SF->getReferencedNameTracker()->getTopLevelNames()) {
for (Identifier name : tracker->getTopLevelNames()) {
out << "\t" << name << "\n";
}
// FIXME: Sort these?
out << "member-access:\n";
for (auto usedNominal : tracker->getUsedNominals()) {
if (usedNominal->hasAccessibility() &&
usedNominal->getAccessibility() == Accessibility::Private)
continue;
Mangle::Mangler mangler(out, /*debug style=*/false, /*Unicode=*/true);
out << "\t";
mangler.mangleContext(usedNominal, Mangle::Mangler::BindGenerics::None);
out << "\n";
}
return false;
}