void DominatorTree::verifyAnalysis() const { if (!VerifyDomInfo) return; Function &F = *getRoot()->getParent(); DominatorTree OtherDT; OtherDT.getBase().recalculate(F); assert(!compare(OtherDT) && "Invalid DominatorTree info!"); }
void DominatorTree::verifyAnalysis() const { if (!VerifyDomInfo) return; Function &F = *getRoot()->getParent(); DominatorTree OtherDT; OtherDT.getBase().recalculate(F); if (compare(OtherDT)) { errs() << "DominatorTree is not up to date!\nComputed:\n"; print(errs()); errs() << "\nActual:\n"; OtherDT.print(errs()); abort(); } }