diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-01-23 22:29:58 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-01-23 22:29:58 +0000 |
commit | f02e26abc04c95be6be02b614ea68616ed5c0927 (patch) | |
tree | 72f4b3829e7d0479930374d2b74f30a1f856d357 /include/llvm/Support/GraphWriter.h | |
parent | f9c98e650d2795b8edfae8e1560c221029df218b (diff) | |
download | external_llvm-f02e26abc04c95be6be02b614ea68616ed5c0927.zip external_llvm-f02e26abc04c95be6be02b614ea68616ed5c0927.tar.gz external_llvm-f02e26abc04c95be6be02b614ea68616ed5c0927.tar.bz2 |
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.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/include/llvm/Support/GraphWriter.h b/include/llvm/Support/GraphWriter.h index 97ab615..5ddc47e 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 '"': |