mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-07 14:33:15 +00:00
Fixes escapeing bug in strings. Fixes test case test/Regression/CBackend/2002-11-06-PrintEscaped.c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4583 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6d608154d6
commit
088b472eed
@ -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 {
|
||||
|
@ -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…
x
Reference in New Issue
Block a user