aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Grosser <grosser@fim.uni-passau.de>2009-11-30 12:37:39 +0000
committerTobias Grosser <grosser@fim.uni-passau.de>2009-11-30 12:37:39 +0000
commitfd748c9df057cd33fe255b9ff81e720518f82cb3 (patch)
treebb9f32401785a44d425f45457d4354afe5d62597
parent989dd8528652afdfcf5125f7d206bc0f075861e7 (diff)
downloadexternal_llvm-fd748c9df057cd33fe255b9ff81e720518f82cb3.zip
external_llvm-fd748c9df057cd33fe255b9ff81e720518f82cb3.tar.gz
external_llvm-fd748c9df057cd33fe255b9ff81e720518f82cb3.tar.bz2
Do not point edge heads to source labels
If no destination label is available, just point to the node itself instead of pointing to some source label. Source and destination labels are not related in any way. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90132 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Support/GraphWriter.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/include/llvm/Support/GraphWriter.h b/include/llvm/Support/GraphWriter.h
index 6d1b18e..c89eb55 100644
--- a/include/llvm/Support/GraphWriter.h
+++ b/include/llvm/Support/GraphWriter.h
@@ -247,12 +247,8 @@ public:
if (SrcNodePort >= 0)
O << ":s" << SrcNodePort;
O << " -> Node" << DestNodeID;
- if (DestNodePort >= 0) {
- if (DOTTraits::hasEdgeDestLabels())
- O << ":d" << DestNodePort;
- else
- O << ":s" << DestNodePort;
- }
+ if (DestNodePort >= 0 && DOTTraits::hasEdgeDestLabels())
+ O << ":d" << DestNodePort;
if (!Attrs.empty())
O << "[" << Attrs << "]";