We need to escape filenames the same way in InclusionRewriter whether
UseLineDirective is true or false.
Review comment from http://llvm.org/bugs/show_bug.cgi?id=17018#c2
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190834
91177308-0d34-0410-b5e6-
96231b3b80d8
if (!ShowLineMarkers)
return;
if (UseLineDirective) {
- OS << "#line" << ' ' << Line << ' ' << '"' << Filename << '"';
+ OS << "#line" << ' ' << Line << ' ' << '"';
+ OS.write_escaped(Filename);
+ OS << '"';
} else {
// Use GNU linemarkers as described here:
// http://gcc.gnu.org/onlinedocs/cpp/Preprocessor-Output.html