From 9a7b37b8a35e60494cde8b2bb6b6cab587836c7a Mon Sep 17 00:00:00 2001 From: Tobias Grosser Date: Fri, 16 Jul 2010 05:59:39 +0000 Subject: [PATCH] Add dump() to DominanceFrontier git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108512 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Analysis/Dominators.h | 3 +++ lib/VMCore/Dominators.cpp | 5 +++++ 2 files changed, 8 insertions(+) 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()); +} +