Still generate a node, but leave the redundant field empty.
Differential Revision: https://reviews.llvm.org/D51821
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@342308
91177308-0d34-0410-b5e6-
96231b3b80d8
<< ")"
<< " NodeID: " << N->getID(&Graph) << " (" << (const void *)N << ")\\|";
- State->printDOT(Out, N->getLocationContext());
+ bool SameAsAllPredecessors =
+ std::all_of(N->pred_begin(), N->pred_end(), [&](const ExplodedNode *P) {
+ return P->getState() == State;
+ });
+ if (!SameAsAllPredecessors)
+ State->printDOT(Out, N->getLocationContext());
return Out.str();
}
};