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

@@ -808,33 +808,6 @@
"usr": "s:Si"
}
]
},
{
"kind": "Setter",
"name": "_",
"printedName": "_()",
"declKind": "Accessor",
"usr": "s:4cake17fixedLayoutStructV1b33_3D8926C30F7417F2EF9A277D0C73FBDBLLSivs",
"location": "",
"moduleName": "cake",
"implicit": true,
"mutating": true,
"declAttributes": [
"Transparent"
],
"children": [
{
"kind": "TypeNominal",
"name": "Void",
"printedName": "()"
},
{
"kind": "TypeNominal",
"name": "Int",
"printedName": "Int",
"usr": "s:Si"
}
]
}
]
},
@@ -877,33 +850,6 @@
"usr": "s:Si"
}
]
},
{
"kind": "Setter",
"name": "_",
"printedName": "_()",
"declKind": "Accessor",
"usr": "s:4cake17fixedLayoutStructV1cSivs",
"location": "",
"moduleName": "cake",
"implicit": true,
"mutating": true,
"declAttributes": [
"Transparent"
],
"children": [
{
"kind": "TypeNominal",
"name": "Void",
"printedName": "()"
},
{
"kind": "TypeNominal",
"name": "Int",
"printedName": "Int",
"usr": "s:Si"
}
]
}
]
},

View File

@@ -1257,9 +1257,11 @@ 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())
if (auto Setter = VAD->getSetter()) {
if (Setter->getFormalAccess() > AccessLevel::Internal)
Var->addChild(constructFunctionNode(Ctx, Setter, SDKNodeKind::DeclSetter));
}
}
return Var;
}