aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/PrintPreprocessedOutput.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2013-01-09 03:16:42 +0000
committerEli Friedman <eli.friedman@gmail.com>2013-01-09 03:16:42 +0000
commit086cc83a84bfab60685b69e3afa3e4500daebb4d (patch)
treea9c0fd6d7f557b4db273db367a2ce4f912f8fddb /lib/Frontend/PrintPreprocessedOutput.cpp
parenta0f2d02d166880e5d826074b6c2ecbf64f8ca70d (diff)
Make sure clang puts tokens from different files on separate lines in "-E -P" mode. <rdar://problem/12774044>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171944 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PrintPreprocessedOutput.cpp')
-rw-r--r--lib/Frontend/PrintPreprocessedOutput.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Frontend/PrintPreprocessedOutput.cpp b/lib/Frontend/PrintPreprocessedOutput.cpp
index afad0a9f5f..02da71bbbe 100644
--- a/lib/Frontend/PrintPreprocessedOutput.cpp
+++ b/lib/Frontend/PrintPreprocessedOutput.cpp
@@ -268,7 +268,10 @@ void PrintPPOutputPPCallbacks::FileChanged(SourceLocation Loc,
Lexer::Stringify(CurFilename);
FileType = NewFileType;
- if (DisableLineMarkers) return;
+ if (DisableLineMarkers) {
+ startNewLineIfNeeded(/*ShouldUpdateCurrentLine=*/false);
+ return;
+ }
if (!Initialized) {
WriteLineInfo(CurLine);