aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Support/GraphWriter.h
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2009-07-09 17:06:18 +0000
committerDavid Greene <greened@obbligato.org>2009-07-09 17:06:18 +0000
commit00ad26ff5760ff2d1b24acb18718e63541088923 (patch)
treef54e1d9a35767638a1bab8a43d014e583d998a8e /include/llvm/Support/GraphWriter.h
parent354b5ac1610424a5fa56735425a43b8a475f5980 (diff)
Add support for other GraphViz display tools. This can help
with very large graphs, where dot isn't necessarily the most visually pleasing way of looking at the graph. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75144 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/GraphWriter.h')
-rw-r--r--include/llvm/Support/GraphWriter.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/include/llvm/Support/GraphWriter.h b/include/llvm/Support/GraphWriter.h
index 4944788b9e..3ebfca2b30 100644
--- a/include/llvm/Support/GraphWriter.h
+++ b/include/llvm/Support/GraphWriter.h
@@ -67,7 +67,17 @@ namespace DOT { // Private functions...
}
}
-void DisplayGraph(const sys::Path& Filename, bool wait=true);
+namespace GraphProgram {
+ enum Name {
+ DOT,
+ FDP,
+ NEATO,
+ TWOPI,
+ CIRCO
+ };
+}
+
+void DisplayGraph(const sys::Path& Filename, bool wait=true, GraphProgram::Name program = GraphProgram::DOT);
template<typename GraphType>
class GraphWriter {
@@ -314,14 +324,15 @@ template<typename GraphType>
void ViewGraph(const GraphType& G,
const std::string& Name,
bool ShortNames = false,
- const std::string& Title = "") {
+ const std::string& Title = "",
+ GraphProgram::Name Program = GraphProgram::DOT) {
sys::Path Filename = WriteGraph(G, Name, ShortNames, Title);
if (Filename.isEmpty()) {
return;
}
- DisplayGraph(Filename);
+ DisplayGraph(Filename, true, Program);
}
} // End llvm namespace