summaryrefslogtreecommitdiff
path: root/include/llvm/Support/GraphWriter.h
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-01-23 22:29:58 +0000
committerTed Kremenek <kremenek@apple.com>2008-01-23 22:29:58 +0000
commitf02e26abc04c95be6be02b614ea68616ed5c0927 (patch)
tree72f4b3829e7d0479930374d2b74f30a1f856d357 /include/llvm/Support/GraphWriter.h
parentf9c98e650d2795b8edfae8e1560c221029df218b (diff)
downloadllvm-f02e26abc04c95be6be02b614ea68616ed5c0927.tar.gz
llvm-f02e26abc04c95be6be02b614ea68616ed5c0927.tar.bz2
llvm-f02e26abc04c95be6be02b614ea68616ed5c0927.tar.xz
Added special escape sequences "\{", "\}", and "\|" when processing
getNodeLabel(); these sequences allow the user to specify the characters '{', '}', and '|' in the label, which facilitate breaking the label into multiple record segments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46283 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/GraphWriter.h')
-rw-r--r--include/llvm/Support/GraphWriter.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/llvm/Support/GraphWriter.h b/include/llvm/Support/GraphWriter.h
index 97ab615339..5ddc47e0a8 100644
--- a/include/llvm/Support/GraphWriter.h
+++ b/include/llvm/Support/GraphWriter.h
@@ -48,8 +48,13 @@ namespace DOT { // Private functions...
Str[i] = ' ';
break;
case '\\':
- if (i+1 != Str.length() && Str[i+1] == 'l')
- break; // don't disturb \l
+ if (i+1 != Str.length())
+ switch (Str[i+1]) {
+ case 'l': continue; // don't disturb \l
+ case '|': case '{': case '}':
+ Str.erase(Str.begin()+i); continue;
+ default: break;
+ }
case '{': case '}':
case '<': case '>':
case '|': case '"':