r304464 - Escape filenames in module map line marker directives, to unbreak Windows build bots.
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 1 13:10:35 PDT 2017
Author: rsmith
Date: Thu Jun 1 15:10:35 2017
New Revision: 304464
URL: http://llvm.org/viewvc/llvm-project?rev=304464&view=rev
Log:
Escape filenames in module map line marker directives, to unbreak Windows build bots.
Modified:
cfe/trunk/lib/Frontend/FrontendActions.cpp
cfe/trunk/lib/Frontend/Rewrite/FrontendActions.cpp
Modified: cfe/trunk/lib/Frontend/FrontendActions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/FrontendActions.cpp?rev=304464&r1=304463&r2=304464&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/FrontendActions.cpp (original)
+++ cfe/trunk/lib/Frontend/FrontendActions.cpp Thu Jun 1 15:10:35 2017
@@ -546,8 +546,11 @@ void PrintPreprocessedAction::ExecuteAct
// 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);
Modified: cfe/trunk/lib/Frontend/Rewrite/FrontendActions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/Rewrite/FrontendActions.cpp?rev=304464&r1=304463&r2=304464&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/Rewrite/FrontendActions.cpp (original)
+++ cfe/trunk/lib/Frontend/Rewrite/FrontendActions.cpp Thu Jun 1 15:10:35 2017
@@ -200,8 +200,11 @@ void RewriteIncludesAction::ExecuteActio
// 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);
More information about the cfe-commits
mailing list