forked from OSchip/llvm-project
Fixes escapeing bug in strings. Fixes test case test/Regression/CBackend/2002-11-06-PrintEscaped.c
llvm-svn: 4583
This commit is contained in:
parent
36053f5b52
commit
642f44fe8e
|
@ -297,8 +297,8 @@ void CWriter::printConstantArray(ConstantArray *CPA) {
|
||||||
(unsigned char)cast<ConstantUInt>(CPA->getOperand(i))->getValue();
|
(unsigned char)cast<ConstantUInt>(CPA->getOperand(i))->getValue();
|
||||||
|
|
||||||
if (isprint(C)) {
|
if (isprint(C)) {
|
||||||
if (C == '"')
|
if (C == '"' || C == '\\')
|
||||||
Out << "\\\"";
|
Out << "\\" << C;
|
||||||
else
|
else
|
||||||
Out << C;
|
Out << C;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue