mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-25 12:49:50 +00:00
Allow simple nodes to have outgoing edges
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4202 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e8e035b591
commit
7be17dd233
@ -141,17 +141,28 @@ public:
|
||||
}
|
||||
|
||||
/// emitSimpleNode - Outputs a simple (non-record) node
|
||||
void emitSimpleNode(void *ID, const std::string &Attr,
|
||||
const std::string &Label) {
|
||||
void emitSimpleNode(const void *ID, const std::string &Attr,
|
||||
const std::string &Label, unsigned NumEdgeSources = 0) {
|
||||
O << "\tNode" << ID << "[ ";
|
||||
if (!Attr.empty())
|
||||
O << Attr << ",";
|
||||
O << " label =\"" << DOT::EscapeString(Label) << "\"];\n";
|
||||
O << " label =\"{" << DOT::EscapeString(Label);
|
||||
if (NumEdgeSources) {
|
||||
O << "|{";
|
||||
|
||||
for (unsigned i = 0; i != NumEdgeSources; ++i) {
|
||||
if (i) O << "|";
|
||||
O << "<g" << i << ">";
|
||||
}
|
||||
O << "}";
|
||||
}
|
||||
O << "}\"];\n";
|
||||
}
|
||||
|
||||
/// emitEdge - Output an edge from a simple node into the graph...
|
||||
void emitEdge(void *SrcNodeID, int SrcNodePort,
|
||||
void *DestNodeID, int DestNodePort, const std::string &Attrs) {
|
||||
void emitEdge(const void *SrcNodeID, int SrcNodePort,
|
||||
const void *DestNodeID, int DestNodePort,
|
||||
const std::string &Attrs) {
|
||||
O << "\tNode" << SrcNodeID;
|
||||
if (SrcNodePort >= 0)
|
||||
O << ":g" << SrcNodePort;
|
||||
|
@ -141,17 +141,28 @@ public:
|
||||
}
|
||||
|
||||
/// emitSimpleNode - Outputs a simple (non-record) node
|
||||
void emitSimpleNode(void *ID, const std::string &Attr,
|
||||
const std::string &Label) {
|
||||
void emitSimpleNode(const void *ID, const std::string &Attr,
|
||||
const std::string &Label, unsigned NumEdgeSources = 0) {
|
||||
O << "\tNode" << ID << "[ ";
|
||||
if (!Attr.empty())
|
||||
O << Attr << ",";
|
||||
O << " label =\"" << DOT::EscapeString(Label) << "\"];\n";
|
||||
O << " label =\"{" << DOT::EscapeString(Label);
|
||||
if (NumEdgeSources) {
|
||||
O << "|{";
|
||||
|
||||
for (unsigned i = 0; i != NumEdgeSources; ++i) {
|
||||
if (i) O << "|";
|
||||
O << "<g" << i << ">";
|
||||
}
|
||||
O << "}";
|
||||
}
|
||||
O << "}\"];\n";
|
||||
}
|
||||
|
||||
/// emitEdge - Output an edge from a simple node into the graph...
|
||||
void emitEdge(void *SrcNodeID, int SrcNodePort,
|
||||
void *DestNodeID, int DestNodePort, const std::string &Attrs) {
|
||||
void emitEdge(const void *SrcNodeID, int SrcNodePort,
|
||||
const void *DestNodeID, int DestNodePort,
|
||||
const std::string &Attrs) {
|
||||
O << "\tNode" << SrcNodeID;
|
||||
if (SrcNodePort >= 0)
|
||||
O << ":g" << SrcNodePort;
|
||||
|
Loading…
Reference in New Issue
Block a user