ABI-checker: include Swift symbols only when ABI checking is enabled

ABI checking logics are largely Swift-specific, so we should exclude
symbols from the underlying Clang module.

rdar://64373983
This commit is contained in:
Xi Ge
2020-06-16 12:36:36 -07:00
parent f159175936
commit 4448a229df
4 changed files with 4 additions and 11 deletions

View File

@@ -1573,6 +1573,7 @@ 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.
// FIXME: isFromClang also excludes Swift decls with @objc. We should allow those.
if (Opts.SwiftOnly && isFromClang(D)) {
return true;
}