Commits

Michael Gottesman committed 114345b7731
[callgraph] Add basic verification of the callgraph. This is currently disabled by default since this verification trips on ToT when I checked a few days ago. The current checks that are performed are: 1. For every (SILFunction, CallGraphNode) pair FuncPair in the SILFunction to CallGraphNode map check that: a. FuncPair.first is a SILFunction in the current module. b. FuncPair.first is the SILFunction inside the CallGraphNode FuncPair.second. c. All CallGraphEdges mapped to FuncPair.second have ApplyInsts which are in the SILFunction FuncPair.first. 2. For every pair (ApplyInst, CallGraphEdge) ApplyPair in the Apply to CallGraphEdge map, check that: a. ApplyPair.second.getCallSite() == ApplyPair.first. b. ApplyPair.first->getFunction() is in the SILFunction to CallGraphNode map and the CallGraphEdge for ApplyPair is one of CallSiteEdges in the mapped to CallGraphNode. <rdar://problem/19944399> Swift SVN r25520