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 | 00477cf26deaf440e8d73e8594ab87051b5b80bb (patch) | |
tree | 9c8ef99ab602d5c997a9d01989779bf29b4bcbc5 /lib/Target | |
parent | ada280faa9e4e912543d1dc1a536ecf4cc396260 (diff) | |
download | external_llvm-00477cf26deaf440e8d73e8594ab87051b5b80bb.zip external_llvm-00477cf26deaf440e8d73e8594ab87051b5b80bb.tar.gz external_llvm-00477cf26deaf440e8d73e8594ab87051b5b80bb.tar.bz2 |
Bug fix: don't unnecessarily pretty-print control-characters, some of
which were wrong (particularly, '\a' for '\007').
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7393 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/SparcV9/SparcV9AsmPrinter.cpp | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/lib/Target/SparcV9/SparcV9AsmPrinter.cpp b/lib/Target/SparcV9/SparcV9AsmPrinter.cpp index 1094a48..b541e98 100644 --- a/lib/Target/SparcV9/SparcV9AsmPrinter.cpp +++ b/lib/Target/SparcV9/SparcV9AsmPrinter.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 += "\""; |