diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp index 34c8089710c..eff432ead11 100644 --- a/lib/Analysis/DataStructure/DataStructure.cpp +++ b/lib/Analysis/DataStructure/DataStructure.cpp @@ -1970,10 +1970,12 @@ void DSGraph::computeNodeMapping(const DSNodeHandle &NH1, DSNodeHandle &Entry = NodeMap[N1]; if (Entry.getNode()) { // Termination of recursion! - assert(!StrictChecking || - (Entry.getNode() == N2 && - Entry.getOffset() == (NH2.getOffset()-NH1.getOffset())) && - "Inconsistent mapping detected!"); + if (StrictChecking) { + assert(Entry.getNode() == N2 && "Inconsistent mapping detected!"); + assert((Entry.getOffset() == (NH2.getOffset()-NH1.getOffset()) || + Entry.getNode()->isNodeCompletelyFolded()) && + "Inconsistent mapping detected!"); + } return; }