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();
|
||||
|
||||
if (isprint(C)) {
|
||||
if (C == '"')
|
||||
Out << "\\\"";
|
||||
if (C == '"' || C == '\\')
|
||||
Out << "\\" << C;
|
||||
else
|
||||
Out << C;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue