From 95d0b541c14cc2a350261292ff0b5652f35fb4aa Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 12 Nov 2003 17:58:22 +0000 Subject: [PATCH] Add new argument to disable checking llvm-svn: 9922 --- lib/Analysis/DataStructure/DataStructure.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp index 9d9813cd7cb..c970e2e14a3 100644 --- a/lib/Analysis/DataStructure/DataStructure.cpp +++ b/lib/Analysis/DataStructure/DataStructure.cpp @@ -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; }