Switch another write_escaped to yaml::escape

I missed one in r206443.

llvm-svn: 208941
This commit is contained in:
Ben Langmuir 2014-05-16 01:38:59 +00:00
parent 084398857a
commit 5bf828dd34
2 changed files with 4 additions and 4 deletions

View File

@ -115,10 +115,10 @@ private:
OS.indent(Indent) << "{\n";
Indent += 2;
OS.indent(Indent) << "'type': 'directory',\n";
OS.indent(Indent) << "'name': \"";
StringRef DirName = containedPart(ParentPath,
path::parent_path(Entry.VPath));
OS.write_escaped(DirName) << "\",\n";
OS.indent(Indent)
<< "'name': \"" << llvm::yaml::escape(DirName) << "\",\n";
OS.indent(Indent) << "'contents': [\n";
Entries = printContents(Entries, Indent + 2);
OS.indent(Indent) << "]\n";

View File

@ -91,7 +91,7 @@ TEST(libclang, VirtualFileOverlay) {
" 'roots': [\n"
" {\n"
" 'type': 'directory',\n"
" 'name': \"/path/virtual\",\n"
" 'name': \"/path/\\u266B\",\n"
" 'contents': [\n"
" {\n"
" 'type': 'file',\n"
@ -103,7 +103,7 @@ TEST(libclang, VirtualFileOverlay) {
" ]\n"
"}\n";
TestVFO T(contents);
T.map("/path/virtual/☂.h", "/real/☂.h");
T.map("/path//☂.h", "/real/☂.h");
}
{
TestVFO T(NULL);