diff options
author | dim <dim@FreeBSD.org> | 2011-02-20 12:57:14 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-02-20 12:57:14 +0000 |
commit | cbb70ce070d220642b038ea101d9c0f9fbf860d6 (patch) | |
tree | d2b61ce94e654cb01a254d2195259db5f9cc3f3c /tools/opt/GraphPrinters.cpp | |
parent | 4ace901e87dac5bbbac78ed325e75462e48e386e (diff) | |
download | FreeBSD-src-cbb70ce070d220642b038ea101d9c0f9fbf860d6.zip FreeBSD-src-cbb70ce070d220642b038ea101d9c0f9fbf860d6.tar.gz |
Vendor import of llvm trunk r126079:
http://llvm.org/svn/llvm-project/llvm/trunk@126079
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 9de7d6a..791caf5 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; } }; |