summaryrefslogtreecommitdiffstats
path: root/include/llvm/Support/GraphWriter.h
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2009-08-05 15:04:22 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2009-08-05 15:04:22 +0000
commitea2381eb7143e2ba3ad37de386cabd392b6609d8 (patch)
treec14030c7508c6e7ebcec3c260a8579398ede7d0e /include/llvm/Support/GraphWriter.h
parent1e0039d6cf8ff582101cf2d7f7edf05b3187e77f (diff)
downloadexternal_llvm-ea2381eb7143e2ba3ad37de386cabd392b6609d8.zip
external_llvm-ea2381eb7143e2ba3ad37de386cabd392b6609d8.tar.gz
external_llvm-ea2381eb7143e2ba3ad37de386cabd392b6609d8.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
Diffstat (limited to 'include/llvm/Support/GraphWriter.h')
-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 << "]";