summaryrefslogtreecommitdiff
path: root/contrib/llvm/tools/clang/lib/Frontend/FrontendActions.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-06-03 18:18:34 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-06-03 18:18:34 +0000
commit6d97bb297c123377182a5d78b412be5c1d723e08 (patch)
tree5e57003ce58361eb4909e2a22461b096529d726f /contrib/llvm/tools/clang/lib/Frontend/FrontendActions.cpp
parent4224465e820a1a7232255d980e692720169776af (diff)
parentd288ef4c1788d3a951a7558c68312c2d320612b1 (diff)
Notes
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Frontend/FrontendActions.cpp')
-rw-r--r--contrib/llvm/tools/clang/lib/Frontend/FrontendActions.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/contrib/llvm/tools/clang/lib/Frontend/FrontendActions.cpp b/contrib/llvm/tools/clang/lib/Frontend/FrontendActions.cpp
index baaf93b167bc..89ac385ca45d 100644
--- a/contrib/llvm/tools/clang/lib/Frontend/FrontendActions.cpp
+++ b/contrib/llvm/tools/clang/lib/Frontend/FrontendActions.cpp
@@ -546,8 +546,11 @@ void PrintPreprocessedAction::ExecuteAction() {
// module itself before switching to the input buffer.
auto &Input = getCurrentInput();
if (Input.getKind().getFormat() == InputKind::ModuleMap) {
- if (Input.isFile())
- (*OS) << "# 1 \"" << Input.getFile() << "\"\n";
+ if (Input.isFile()) {
+ (*OS) << "# 1 \"";
+ OS->write_escaped(Input.getFile());
+ (*OS) << "\"\n";
+ }
// FIXME: Include additional information here so that we don't need the
// original source files to exist on disk.
getCurrentModule()->print(*OS);