[llvm-commits] CVS: llvm/include/Support/GraphWriter.h

Chris Lattner lattner at cs.uiuc.edu
Wed Feb 5 13:42:01 PST 2003


Changes in directory llvm/include/Support:

GraphWriter.h updated: 1.12 -> 1.13

---
Log message:

Allow the addition of edge source labels


---
Diffs of the changes:

Index: llvm/include/Support/GraphWriter.h
diff -u llvm/include/Support/GraphWriter.h:1.12 llvm/include/Support/GraphWriter.h:1.13
--- llvm/include/Support/GraphWriter.h:1.12	Sun Nov 10 00:47:03 2002
+++ llvm/include/Support/GraphWriter.h	Wed Feb  5 13:40:59 2003
@@ -18,6 +18,7 @@
 
 #include "Support/DOTGraphTraits.h"
 #include "Support/GraphTraits.h"
+#include <vector>
 #include <iostream>
 
 namespace DOT {  // Private functions...
@@ -136,7 +137,8 @@
 
   /// 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 @@
       for (unsigned i = 0; i != NumEdgeSources; ++i) {
         if (i) O << "|";
         O << "<g" << i << ">";
+        if (EdgeSourceLabels) O << (*EdgeSourceLabels)[i];
       }
       O << "}}";
     }





More information about the llvm-commits mailing list