mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 19:12:56 +02:00
Allow the addition of edge source labels
llvm-svn: 5493
This commit is contained in:
parent
4aa35d21be
commit
93e9ec8bb1
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include "Support/DOTGraphTraits.h"
|
#include "Support/DOTGraphTraits.h"
|
||||||
#include "Support/GraphTraits.h"
|
#include "Support/GraphTraits.h"
|
||||||
|
#include <vector>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
namespace DOT { // Private functions...
|
namespace DOT { // Private functions...
|
||||||
@ -136,7 +137,8 @@ public:
|
|||||||
|
|
||||||
/// emitSimpleNode - Outputs a simple (non-record) node
|
/// emitSimpleNode - Outputs a simple (non-record) node
|
||||||
void emitSimpleNode(const void *ID, const std::string &Attr,
|
void emitSimpleNode(const void *ID, const std::string &Attr,
|
||||||
const std::string &Label, unsigned NumEdgeSources = 0) {
|
const std::string &Label, unsigned NumEdgeSources = 0,
|
||||||
|
const std::vector<std::string> *EdgeSourceLabels = 0) {
|
||||||
O << "\tNode" << ID << "[ ";
|
O << "\tNode" << ID << "[ ";
|
||||||
if (!Attr.empty())
|
if (!Attr.empty())
|
||||||
O << Attr << ",";
|
O << Attr << ",";
|
||||||
@ -149,6 +151,7 @@ public:
|
|||||||
for (unsigned i = 0; i != NumEdgeSources; ++i) {
|
for (unsigned i = 0; i != NumEdgeSources; ++i) {
|
||||||
if (i) O << "|";
|
if (i) O << "|";
|
||||||
O << "<g" << i << ">";
|
O << "<g" << i << ">";
|
||||||
|
if (EdgeSourceLabels) O << (*EdgeSourceLabels)[i];
|
||||||
}
|
}
|
||||||
O << "}}";
|
O << "}}";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user