r208941 - Switch another write_escaped to yaml::escape
Ben Langmuir
blangmuir at apple.com
Thu May 15 18:38:59 PDT 2014
Author: benlangmuir
Date: Thu May 15 20:38:59 2014
New Revision: 208941
URL: http://llvm.org/viewvc/llvm-project?rev=208941&view=rev
Log:
Switch another write_escaped to yaml::escape
I missed one in r206443.
Modified:
cfe/trunk/tools/libclang/BuildSystem.cpp
cfe/trunk/unittests/libclang/LibclangTest.cpp
Modified: cfe/trunk/tools/libclang/BuildSystem.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/BuildSystem.cpp?rev=208941&r1=208940&r2=208941&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/BuildSystem.cpp (original)
+++ cfe/trunk/tools/libclang/BuildSystem.cpp Thu May 15 20:38:59 2014
@@ -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";
Modified: cfe/trunk/unittests/libclang/LibclangTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/libclang/LibclangTest.cpp?rev=208941&r1=208940&r2=208941&view=diff
==============================================================================
--- cfe/trunk/unittests/libclang/LibclangTest.cpp (original)
+++ cfe/trunk/unittests/libclang/LibclangTest.cpp Thu May 15 20:38:59 2014
@@ -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);
More information about the cfe-commits
mailing list