diff --git a/llvm/lib/CodeGen/MachineDominators.cpp b/llvm/lib/CodeGen/MachineDominators.cpp index fcfa574ee6c8..517ac29b6450 100644 --- a/llvm/lib/CodeGen/MachineDominators.cpp +++ b/llvm/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/llvm/lib/IR/Dominators.cpp b/llvm/lib/IR/Dominators.cpp index a6127a5ef08d..ad448a3f240c 100644 --- a/llvm/lib/IR/Dominators.cpp +++ b/llvm/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());