diff options
author | Vikram S. Adve <vadve@cs.uiuc.edu> | 2003-07-29 19:57:34 +0000 |
---|---|---|
committer | Vikram S. Adve <vadve@cs.uiuc.edu> | 2003-07-29 19:57:34 +0000 |
commit | dbc0eb6a2d7b66f9be5dae806595339986edd623 (patch) | |
tree | 946fa0d209f6b1345eaa7ffd821bba2ca871353a /llvm/lib/Target/Sparc/EmitAssembly.cpp | |
parent | 648ce40adff3cae5072d630134a9ebefb9422d9c (diff) | |
download | bcm5719-llvm-dbc0eb6a2d7b66f9be5dae806595339986edd623.tar.gz bcm5719-llvm-dbc0eb6a2d7b66f9be5dae806595339986edd623.zip |
Bug fix: don't unnecessarily pretty-print control-characters, some of
which were wrong (particularly, '\a' for '\007').
llvm-svn: 7393
Diffstat (limited to 'llvm/lib/Target/Sparc/EmitAssembly.cpp')
-rw-r--r-- | llvm/lib/Target/Sparc/EmitAssembly.cpp | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/llvm/lib/Target/Sparc/EmitAssembly.cpp b/llvm/lib/Target/Sparc/EmitAssembly.cpp index 1094a484a11..b541e985be2 100644 --- a/llvm/lib/Target/Sparc/EmitAssembly.cpp +++ b/llvm/lib/Target/Sparc/EmitAssembly.cpp @@ -594,21 +594,10 @@ static string getAsCString(const ConstantArray *CVA) { } else if (isprint(C)) { Result += C; } else { - switch(C) { - case '\a': Result += "\\a"; break; - case '\b': Result += "\\b"; break; - case '\f': Result += "\\f"; break; - case '\n': Result += "\\n"; break; - case '\r': Result += "\\r"; break; - case '\t': Result += "\\t"; break; - case '\v': Result += "\\v"; break; - default: - Result += '\\'; - Result += toOctal(C >> 6); - Result += toOctal(C >> 3); - Result += toOctal(C >> 0); - break; - } + Result += '\\'; // print all other chars as octal value + Result += toOctal(C >> 6); + Result += toOctal(C >> 3); + Result += toOctal(C >> 0); } } Result += "\""; |