[llvm-commits] CVS: llvm/lib/CWriter/Writer.cpp
Nicholas Hildenbrandt
hldnbrnd at cs.uiuc.edu
Wed Nov 6 15:41:01 PST 2002
Changes in directory llvm/lib/CWriter:
Writer.cpp updated: 1.70 -> 1.71
---
Log message:
Fixes escapeing bug in strings. Fixes test case test/Regression/CBackend/2002-11-06-PrintEscaped.c
---
Diffs of the changes:
Index: llvm/lib/CWriter/Writer.cpp
diff -u llvm/lib/CWriter/Writer.cpp:1.70 llvm/lib/CWriter/Writer.cpp:1.71
--- llvm/lib/CWriter/Writer.cpp:1.70 Wed Nov 6 14:07:54 2002
+++ llvm/lib/CWriter/Writer.cpp Wed Nov 6 15:40:23 2002
@@ -297,8 +297,8 @@
(unsigned char)cast<ConstantUInt>(CPA->getOperand(i))->getValue();
if (isprint(C)) {
- if (C == '"')
- Out << "\\\"";
+ if (C == '"' || C == '\\')
+ Out << "\\" << C;
else
Out << C;
} else {
More information about the llvm-commits
mailing list