From f02e26abc04c95be6be02b614ea68616ed5c0927 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Wed, 23 Jan 2008 22:29:58 +0000 Subject: 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 --- include/llvm/Support/GraphWriter.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'include/llvm/Support/GraphWriter.h') 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 '"': -- cgit v1.2.3