Add new argument to disable checking

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9922 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2003-11-12 17:58:22 +00:00
parent f58aefcb20
commit afc1dbafb4

View File

@ -1646,15 +1646,17 @@ void DSGraph::mergeInGlobalsGraph() {
/// the first to the second graph.
///
void DSGraph::computeNodeMapping(const DSNodeHandle &NH1,
const DSNodeHandle &NH2, NodeMapTy &NodeMap) {
const DSNodeHandle &NH2, NodeMapTy &NodeMap,
bool StrictChecking) {
DSNode *N1 = NH1.getNode(), *N2 = NH2.getNode();
if (N1 == 0 || N2 == 0) return;
DSNodeHandle &Entry = NodeMap[N1];
if (Entry.getNode()) {
// Termination of recursion!
assert(Entry.getNode() == N2 &&
Entry.getOffset() == (NH2.getOffset()-NH1.getOffset()) &&
assert(!StrictChecking ||
(Entry.getNode() == N2 &&
Entry.getOffset() == (NH2.getOffset()-NH1.getOffset())) &&
"Inconsistent mapping detected!");
return;
}