Add more paranoid assertions :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17367 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-10-31 17:45:40 +00:00
parent 4ad0b11b95
commit 7d8d4711d9

View File

@ -1973,6 +1973,18 @@ void DSGraph::AssertGraphOK() const {
}
AssertCallNodesInGraph();
AssertAuxCallNodesInGraph();
// Check that all pointer arguments to any functions in this graph have
// destinations.
for (ReturnNodesTy::const_iterator RI = ReturnNodes.begin(),
E = ReturnNodes.end();
RI != E; ++RI) {
Function &F = *RI->first;
for (Function::aiterator AI = F.abegin(); AI != F.aend(); ++AI)
if (isPointerType(AI->getType()))
assert(!getNodeForValue(AI).isNull() &&
"Pointer argument must be in the scalar map!");
}
}
/// computeNodeMapping - Given roots in two different DSGraphs, traverse the