diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2011-02-20 12:57:14 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2011-02-20 12:57:14 +0000 |
commit | cf099d11218cb6f6c5cce947d6738e347f07fb12 (patch) | |
tree | d2b61ce94e654cb01a254d2195259db5f9cc3f3c /tools/opt/GraphPrinters.cpp | |
parent | 49011b52fcba02a6051957b84705159f52fae4e4 (diff) |
Diffstat (limited to 'tools/opt/GraphPrinters.cpp')
-rw-r--r-- | tools/opt/GraphPrinters.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/tools/opt/GraphPrinters.cpp b/tools/opt/GraphPrinters.cpp index 9de7d6ac5459c..791caf571c298 100644 --- a/tools/opt/GraphPrinters.cpp +++ b/tools/opt/GraphPrinters.cpp @@ -18,8 +18,8 @@ #include "llvm/Pass.h" #include "llvm/Value.h" #include "llvm/Analysis/CallGraph.h" -#include "llvm/Analysis/Dominators.h" -#include "llvm/Support/raw_ostream.h" +#include "llvm/Analysis/DominanceFrontier.h" +#include "llvm/Support/ToolOutputFile.h" using namespace llvm; template<typename GraphType> @@ -61,8 +61,7 @@ namespace llvm { static std::string getNodeLabel(CallGraphNode *Node, CallGraph *Graph) { if (Node->getFunction()) return ((Value*)Node->getFunction())->getName(); - else - return "external node"; + return "external node"; } }; } @@ -109,10 +108,8 @@ namespace { } virtual bool runOnFunction(Function &F) { - DominatorTree &DT = getAnalysis<DominatorTree>(); - DT.dump(); - DominanceFrontier &DF = getAnalysis<DominanceFrontier>(); - DF.dump(); + getAnalysis<DominatorTree>().dump(); + getAnalysis<DominanceFrontier>().dump(); return false; } }; |