mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
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
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user