mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +00:00
Allow the addition of edge source labels
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5493 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b8925bce83
commit
a329733f47
@ -18,6 +18,7 @@
|
||||
|
||||
#include "Support/DOTGraphTraits.h"
|
||||
#include "Support/GraphTraits.h"
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
|
||||
namespace DOT { // Private functions...
|
||||
@ -136,7 +137,8 @@ public:
|
||||
|
||||
/// emitSimpleNode - Outputs a simple (non-record) node
|
||||
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 << "[ ";
|
||||
if (!Attr.empty())
|
||||
O << Attr << ",";
|
||||
@ -149,6 +151,7 @@ public:
|
||||
for (unsigned i = 0; i != NumEdgeSources; ++i) {
|
||||
if (i) O << "|";
|
||||
O << "<g" << i << ">";
|
||||
if (EdgeSourceLabels) O << (*EdgeSourceLabels)[i];
|
||||
}
|
||||
O << "}}";
|
||||
}
|
||||
|
@ -18,6 +18,7 @@
|
||||
|
||||
#include "Support/DOTGraphTraits.h"
|
||||
#include "Support/GraphTraits.h"
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
|
||||
namespace DOT { // Private functions...
|
||||
@ -136,7 +137,8 @@ public:
|
||||
|
||||
/// emitSimpleNode - Outputs a simple (non-record) node
|
||||
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 << "[ ";
|
||||
if (!Attr.empty())
|
||||
O << Attr << ",";
|
||||
@ -149,6 +151,7 @@ public:
|
||||
for (unsigned i = 0; i != NumEdgeSources; ++i) {
|
||||
if (i) O << "|";
|
||||
O << "<g" << i << ">";
|
||||
if (EdgeSourceLabels) O << (*EdgeSourceLabels)[i];
|
||||
}
|
||||
O << "}}";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user