aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Lenharth <alenhar2@cs.uiuc.edu>2009-08-05 15:04:22 +0000
committerAndrew Lenharth <alenhar2@cs.uiuc.edu>2009-08-05 15:04:22 +0000
commitb217bfa3b6d0649942c4f231ca5cc5ac85c5503c (patch)
treec14030c7508c6e7ebcec3c260a8579398ede7d0e
parent51df020bf01f3cbbc67ebb41e4f6d9240794f2b5 (diff)
downloadexternal_llvm-b217bfa3b6d0649942c4f231ca5cc5ac85c5503c.zip
external_llvm-b217bfa3b6d0649942c4f231ca5cc5ac85c5503c.tar.gz
external_llvm-b217bfa3b6d0649942c4f231ca5cc5ac85c5503c.tar.bz2
only point to dest labels if the graph has them
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78192 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Support/GraphWriter.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/llvm/Support/GraphWriter.h b/include/llvm/Support/GraphWriter.h
index 26db5fd..0bb362f 100644
--- a/include/llvm/Support/GraphWriter.h
+++ b/include/llvm/Support/GraphWriter.h
@@ -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 << "]";