From: Mikael Holmen Date: Wed, 6 Dec 2017 09:27:48 +0000 (+0000) Subject: [[Machine]Dominators] Improved printout when verifyDomTree fails [NFC] X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3371137454cb5f1c68fe09f0901e40874034de18;p=llvm [[Machine]Dominators] Improved printout when verifyDomTree fails [NFC] Include the function name in the printout. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319882 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/MachineDominators.cpp b/lib/CodeGen/MachineDominators.cpp index fcfa574ee6c..517ac29b645 100644 --- a/lib/CodeGen/MachineDominators.cpp +++ b/lib/CodeGen/MachineDominators.cpp @@ -148,7 +148,8 @@ void MachineDominatorTree::verifyDomTree() const { OtherDT.recalculate(F); if (getRootNode()->getBlock() != OtherDT.getRootNode()->getBlock() || DT->compare(OtherDT)) { - errs() << "MachineDominatorTree is not up to date!\nComputed:\n"; + errs() << "MachineDominatorTree for function " << F.getName() + << " is not up to date!\nComputed:\n"; DT->print(errs()); errs() << "\nActual:\n"; OtherDT.print(errs()); diff --git a/lib/IR/Dominators.cpp b/lib/IR/Dominators.cpp index a6127a5ef08..ad448a3f240 100644 --- a/lib/IR/Dominators.cpp +++ b/lib/IR/Dominators.cpp @@ -315,7 +315,8 @@ void DominatorTree::verifyDomTree() const { DominatorTree OtherDT; OtherDT.recalculate(F); if (compare(OtherDT)) { - errs() << "DominatorTree is not up to date!\nComputed:\n"; + errs() << "DominatorTree for function " << F.getName() + << " is not up to date!\nComputed:\n"; print(errs()); errs() << "\nActual:\n"; OtherDT.print(errs());