diff options
author | Chris Lattner <sabre@nondot.org> | 2004-10-31 17:45:40 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-10-31 17:45:40 +0000 |
commit | 7d8d4711d92e72b5a6e6085eb2457683aeb6003d (patch) | |
tree | 2a8c9a13f04dcaa8f538306e687f79f11b40c10c /lib/Analysis/DataStructure/DataStructure.cpp | |
parent | 4ad0b11b95cb7ccc13ee80c6db2869beea3b0fd9 (diff) |
Add more paranoid assertions :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17367 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DataStructure/DataStructure.cpp')
-rw-r--r-- | lib/Analysis/DataStructure/DataStructure.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp index bd5c5607cf..60aa766663 100644 --- a/lib/Analysis/DataStructure/DataStructure.cpp +++ b/lib/Analysis/DataStructure/DataStructure.cpp @@ -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 |