diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h index 1979d3f6820..f79afdd1e9c 100644 --- a/include/llvm/Analysis/Dominators.h +++ b/include/llvm/Analysis/Dominators.h @@ -995,6 +995,9 @@ public: /// print - Convert to human readable form /// virtual void print(raw_ostream &OS, const Module* = 0) const; + + /// dump - Dump the dominance frontier to dbgs(). + void dump() const; }; diff --git a/lib/VMCore/Dominators.cpp b/lib/VMCore/Dominators.cpp index 10a866fab62..ef830337140 100644 --- a/lib/VMCore/Dominators.cpp +++ b/lib/VMCore/Dominators.cpp @@ -17,6 +17,7 @@ #include "llvm/Analysis/Dominators.h" #include "llvm/Support/CFG.h" #include "llvm/Support/Compiler.h" +#include "llvm/Support/Debug.h" #include "llvm/ADT/DepthFirstIterator.h" #include "llvm/ADT/SetOperations.h" #include "llvm/ADT/SmallPtrSet.h" @@ -343,3 +344,7 @@ void DominanceFrontierBase::print(raw_ostream &OS, const Module* ) const { } } +void DominanceFrontierBase::dump() const { + print(dbgs()); +} +