[llvm-commits] [llvm] r46283 - /llvm/trunk/include/llvm/Support/GraphWriter.h
Ted Kremenek
kremenek at apple.com
Wed Jan 23 14:29:59 PST 2008
Author: kremenek
Date: Wed Jan 23 16:29:58 2008
New Revision: 46283
URL: http://llvm.org/viewvc/llvm-project?rev=46283&view=rev
Log:
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.
Modified:
llvm/trunk/include/llvm/Support/GraphWriter.h
Modified: llvm/trunk/include/llvm/Support/GraphWriter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/GraphWriter.h?rev=46283&r1=46282&r2=46283&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/GraphWriter.h (original)
+++ llvm/trunk/include/llvm/Support/GraphWriter.h Wed Jan 23 16:29:58 2008
@@ -48,8 +48,13 @@
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 '"':
More information about the llvm-commits
mailing list