only point to dest labels if the graph has them
authorAndrew Lenharth <andrewl@lenharth.org>
Wed, 5 Aug 2009 15:04:22 +0000 (15:04 +0000)
committerAndrew Lenharth <andrewl@lenharth.org>
Wed, 5 Aug 2009 15:04:22 +0000 (15:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78192 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/GraphWriter.h

index 26db5fd655f662c9380a5fdbec22c21d292fa31c..0bb362f8673528db4c3e9b3141349606c1f30d01 100644 (file)
@@ -252,8 +252,12 @@ public:
     if (SrcNodePort >= 0)
       O << ":s" << SrcNodePort;
     O << " -> Node" << DestNodeID;
-    if (DestNodePort >= 0)
-      O << ":d" << DestNodePort;
+    if (DestNodePort >= 0) {
+      if (DOTTraits::hasEdgeDestLabels())
+       O << ":d" << DestNodePort;
+      else
+       O << ":s" << DestNodePort;
+    }
 
     if (!Attrs.empty())
       O << "[" << Attrs << "]";