swift-module-digester: don't include private setters.

This commit is contained in:
Xi Ge
2018-09-21 17:23:37 -07:00
parent 01afc3395e
commit 15377ecac7
2 changed files with 4 additions and 56 deletions

View File

@@ -1257,8 +1257,10 @@ static SDKNode *constructVarNode(SDKContext &Ctx, ValueDecl *VD) {
if (auto VAD = dyn_cast<AbstractStorageDecl>(VD)) {
if (auto Getter = VAD->getGetter())
Var->addChild(constructFunctionNode(Ctx, Getter, SDKNodeKind::DeclGetter));
if (auto Setter = VAD->getSetter())
Var->addChild(constructFunctionNode(Ctx, Setter, SDKNodeKind::DeclSetter));
if (auto Setter = VAD->getSetter()) {
if (Setter->getFormalAccess() > AccessLevel::Internal)
Var->addChild(constructFunctionNode(Ctx, Setter, SDKNodeKind::DeclSetter));
}
}
return Var;
}