Escape the graph name. This unbreaks -view-cfg.
authorDan Gohman <gohman@apple.com>
Thu, 10 Jul 2008 19:55:54 +0000 (19:55 +0000)
committerDan Gohman <gohman@apple.com>
Thu, 10 Jul 2008 19:55:54 +0000 (19:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53417 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/GraphWriter.h

index 14a70cb1892550c914a2994eeb26b4fad8c6148b..dab09e57c6a4f89e96de470bd1d809cee7c2c9ce 100644 (file)
@@ -87,7 +87,7 @@ public:
     if (!Name.empty())
       O << "digraph " << Name << " {\n";
     else if (!GraphName.empty())
-      O << "digraph " << GraphName << " {\n";
+      O << "digraph \"" << DOT::EscapeString(GraphName) << "\" {\n";
     else
       O << "digraph unnamed {\n";