summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-04-30 18:27:57 +0000
committerDan Gohman <gohman@apple.com>2010-04-30 18:27:57 +0000
commite0d8f9dbe909be4d59ab45a56f448e5a8d648992 (patch)
tree8f5115b142d2e6b840cfa26d914df2abec9041f9
parent9f84c7b600ee82e43fd1209acb6a5dae2fd8f5ae (diff)
downloadbcm5719-llvm-e0d8f9dbe909be4d59ab45a56f448e5a8d648992.tar.gz
bcm5719-llvm-e0d8f9dbe909be4d59ab45a56f448e5a8d648992.zip
Properly escape edge source and destination labels.
llvm-svn: 102728
-rw-r--r--llvm/include/llvm/Support/GraphWriter.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/include/llvm/Support/GraphWriter.h b/llvm/include/llvm/Support/GraphWriter.h
index 28fa92f99e0..13e6682ebfd 100644
--- a/llvm/include/llvm/Support/GraphWriter.h
+++ b/llvm/include/llvm/Support/GraphWriter.h
@@ -174,7 +174,8 @@ public:
unsigned i = 0, e = DTraits.numEdgeDestLabels(Node);
for (; i != e && i != 64; ++i) {
if (i) O << "|";
- O << "<d" << i << ">" << DTraits.getEdgeDestLabel(Node, i);
+ O << "<d" << i << ">"
+ << DOT::EscapeString(DTraits.getEdgeDestLabel(Node, i));
}
if (i != e)
@@ -230,7 +231,7 @@ public:
for (unsigned i = 0; i != NumEdgeSources; ++i) {
if (i) O << "|";
O << "<s" << i << ">";
- if (EdgeSourceLabels) O << (*EdgeSourceLabels)[i];
+ if (EdgeSourceLabels) O << DOT::EscapeString((*EdgeSourceLabels)[i]);
}
O << "}}";
}
OpenPOWER on IntegriCloud