[llvm-commits] CVS: llvm/lib/Target/Sparc/EmitAssembly.cpp
Vikram Adve
vadve at cs.uiuc.edu
Tue Jul 29 14:58:01 PDT 2003
Changes in directory llvm/lib/Target/Sparc:
EmitAssembly.cpp updated: 1.84 -> 1.85
---
Log message:
Bug fix: don't unnecessarily pretty-print control-characters, some of
which were wrong (particularly, '\a' for '\007').
---
Diffs of the changes:
Index: llvm/lib/Target/Sparc/EmitAssembly.cpp
diff -u llvm/lib/Target/Sparc/EmitAssembly.cpp:1.84 llvm/lib/Target/Sparc/EmitAssembly.cpp:1.85
--- llvm/lib/Target/Sparc/EmitAssembly.cpp:1.84 Wed Jul 23 10:30:04 2003
+++ llvm/lib/Target/Sparc/EmitAssembly.cpp Tue Jul 29 14:57:34 2003
@@ -594,21 +594,10 @@
} 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 += "\"";
More information about the llvm-commits
mailing list