mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-31 17:42:40 +00:00
* Add new DOTGraphTraits::addCustomGraphFeatures method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4197 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ff5feedf28
commit
834a9d12f3
@ -60,6 +60,15 @@ struct DefaultDOTGraphTraits {
|
|||||||
/// edge.
|
/// edge.
|
||||||
template<typename EdgeIter>
|
template<typename EdgeIter>
|
||||||
static EdgeIter getEdgeTarget(void *Node, EdgeIter I) { return I; }
|
static EdgeIter getEdgeTarget(void *Node, EdgeIter I) { return I; }
|
||||||
|
|
||||||
|
/// addCustomGraphFeatures - If a graph is made up of more than just
|
||||||
|
/// straight-forward nodes and edges, this is the place to put all of the
|
||||||
|
/// custom stuff neccesary. The GraphWriter object, instantiated with your
|
||||||
|
/// GraphType is passed in as an argument. You may call arbitrary methods on
|
||||||
|
/// it to add things to the output graph.
|
||||||
|
///
|
||||||
|
template<typename GraphWriter>
|
||||||
|
static void addCustomGraphFeatures(void *Graph, GraphWriter &GW) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -72,7 +72,11 @@ public:
|
|||||||
O << DOTTraits::getGraphProperties(G);
|
O << DOTTraits::getGraphProperties(G);
|
||||||
O << "\n";
|
O << "\n";
|
||||||
|
|
||||||
|
// Emit all of the nodes in the graph...
|
||||||
writeNodes();
|
writeNodes();
|
||||||
|
|
||||||
|
// Output any customizations on the graph
|
||||||
|
DOTTraits::addCustomGraphFeatures(G, *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
~GraphWriter() {
|
~GraphWriter() {
|
||||||
|
@ -60,6 +60,15 @@ struct DefaultDOTGraphTraits {
|
|||||||
/// edge.
|
/// edge.
|
||||||
template<typename EdgeIter>
|
template<typename EdgeIter>
|
||||||
static EdgeIter getEdgeTarget(void *Node, EdgeIter I) { return I; }
|
static EdgeIter getEdgeTarget(void *Node, EdgeIter I) { return I; }
|
||||||
|
|
||||||
|
/// addCustomGraphFeatures - If a graph is made up of more than just
|
||||||
|
/// straight-forward nodes and edges, this is the place to put all of the
|
||||||
|
/// custom stuff neccesary. The GraphWriter object, instantiated with your
|
||||||
|
/// GraphType is passed in as an argument. You may call arbitrary methods on
|
||||||
|
/// it to add things to the output graph.
|
||||||
|
///
|
||||||
|
template<typename GraphWriter>
|
||||||
|
static void addCustomGraphFeatures(void *Graph, GraphWriter &GW) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -72,7 +72,11 @@ public:
|
|||||||
O << DOTTraits::getGraphProperties(G);
|
O << DOTTraits::getGraphProperties(G);
|
||||||
O << "\n";
|
O << "\n";
|
||||||
|
|
||||||
|
// Emit all of the nodes in the graph...
|
||||||
writeNodes();
|
writeNodes();
|
||||||
|
|
||||||
|
// Output any customizations on the graph
|
||||||
|
DOTTraits::addCustomGraphFeatures(G, *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
~GraphWriter() {
|
~GraphWriter() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user