Don't add declarations as call graph roots.

Swift SVN r21554
This commit is contained in:
Mark Lacey
2014-08-29 00:32:18 +00:00
parent dc625f7c19
commit 52cf2f4da2

View File

@@ -55,7 +55,8 @@ void CallGraph::addCallGraphNode(SILFunction *F, unsigned NodeOrdinal) {
// TODO: Only add functions clearly visible from outside our
// compilation scope as roots.
CallGraphRoots.push_back(Node);
if (F->isDefinition())
CallGraphRoots.push_back(Node);
}
void CallGraph::addEdgesForApply(ApplyInst *AI, CallGraphNode *CallerNode) {