Fix TestBreakpointSerialization on windows

The test exposed a bug in the StructuredData Serialization code, which did not
escape the backslash properly. This manifested itself as windows breakpoint
serialization roundtrip test not succeeding (as windows paths included
backslashes).

llvm-svn: 282167
This commit is contained in:
Pavel Labath
2016-09-22 15:26:43 +00:00
parent 2644208381
commit 2a66884f78
3 changed files with 34 additions and 1 deletions

View File

@@ -264,7 +264,7 @@ void StructuredData::String::Dump(Stream &s, bool pretty_print) const {
const size_t strsize = m_value.size();
for (size_t i = 0; i < strsize; ++i) {
char ch = m_value[i];
if (ch == '"')
if (ch == '"' || ch == '\\')
quoted.push_back('\\');
quoted.push_back(ch);
}