aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/DataStructure/DataStructure.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/DataStructure/DataStructure.cpp')
-rw-r--r--lib/Analysis/DataStructure/DataStructure.cpp12
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