From 9e7a1123776dc08e061ec7f5c96cf72355fac260 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Wed, 23 Jan 2008 22:29:58 +0000 Subject: [PATCH] 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. llvm-svn: 46283 --- llvm/include/llvm/Support/GraphWriter.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/llvm/include/llvm/Support/GraphWriter.h b/llvm/include/llvm/Support/GraphWriter.h index 97ab615339ae..5ddc47e0a85c 100644 --- a/llvm/include/llvm/Support/GraphWriter.h +++ b/llvm/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 '"':