Make sure to escape \'s when they are output
authorChris Lattner <sabre@nondot.org>
Tue, 15 Oct 2002 19:56:24 +0000 (19:56 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 15 Oct 2002 19:56:24 +0000 (19:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4179 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/SparcV9/SparcV9AsmPrinter.cpp

index 58a60b0977517b3b755cf9ece2adf4874e8ef77a..ce81248478a0da3fd1cb3ef1f0719533286d95f8 100644 (file)
@@ -586,6 +586,8 @@ static string getAsCString(const ConstantArray *CVA) {
 
     if (C == '"') {
       Result += "\\\"";
+    } else if (C == '\\') {
+      Result += "\\\\";
     } else if (isprint(C)) {
       Result += C;
     } else {