diff options
| author | Chris Lattner <sabre@nondot.org> | 2003-02-05 19:40:59 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2003-02-05 19:40:59 +0000 |
| commit | 6a9307866cf86135b4dbfdda2f9483d7ebe0c29f (patch) | |
| tree | 02496fc22ec0a8f16d1e0cf6cd91fb28e1438076 | |
| parent | d7357ab5d183db09c53ad6b153135cde3d1267a8 (diff) | |
| download | bcm5719-llvm-6a9307866cf86135b4dbfdda2f9483d7ebe0c29f.tar.gz bcm5719-llvm-6a9307866cf86135b4dbfdda2f9483d7ebe0c29f.zip | |
Allow the addition of edge source labels
llvm-svn: 5493
| -rw-r--r-- | llvm/include/Support/GraphWriter.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/include/Support/GraphWriter.h b/llvm/include/Support/GraphWriter.h index 5481274a3f7..3b7b3575544 100644 --- a/llvm/include/Support/GraphWriter.h +++ b/llvm/include/Support/GraphWriter.h @@ -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 << "}}"; } |

