summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/BuildSystem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/tools/libclang/BuildSystem.cpp')
-rw-r--r--clang/tools/libclang/BuildSystem.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/tools/libclang/BuildSystem.cpp b/clang/tools/libclang/BuildSystem.cpp
index c9d3c553273..e5caa5447ba 100644
--- a/clang/tools/libclang/BuildSystem.cpp
+++ b/clang/tools/libclang/BuildSystem.cpp
@@ -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";
OpenPOWER on IntegriCloud