swift-module-digester: add a flag to include Swift decls specifically.

This flag allows us to diagnose the overlay part exclusively without digesting
the entire SDK framework.
This commit is contained in:
Xi Ge
2018-10-09 12:52:27 -07:00
parent b875fdea73
commit 3f58f1e6d3
11 changed files with 124 additions and 46 deletions

View File

@@ -1261,6 +1261,10 @@ SwiftDeclCollector::constructInitNode(ConstructorDecl *CD) {
bool swift::ide::api::
SDKContext::shouldIgnore(Decl *D, const Decl* Parent) const {
// Exclude all clang nodes if we're comparing Swift decls specifically.
if (Opts.SwiftOnly && isFromClang(D)) {
return true;
}
if (checkingABI()) {
if (auto *VD = dyn_cast<ValueDecl>(D)) {
// Private vars with fixed binary orders can have ABI-impact, so we should