summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
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
commitc52435b4a254af96128c19e473071ec30cfb51f2 (patch)
tree6004c6cb005bae3a6c52fe6fce0e74c9d7a3f6f1 /clang/lib/Frontend
parentd7678c6af510b224795d36acca83afc7396f8f7c (diff)
downloadbcm5719-llvm-c52435b4a254af96128c19e473071ec30cfb51f2.tar.gz
bcm5719-llvm-c52435b4a254af96128c19e473071ec30cfb51f2.zip
Make sure clang puts tokens from different files on separate lines in "-E -P" mode. <rdar://problem/12774044>
llvm-svn: 171944
Diffstat (limited to 'clang/lib/Frontend')
-rw-r--r--clang/lib/Frontend/PrintPreprocessedOutput.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/Frontend/PrintPreprocessedOutput.cpp b/clang/lib/Frontend/PrintPreprocessedOutput.cpp
index afad0a9f5ff..02da71bbbe8 100644
--- a/clang/lib/Frontend/PrintPreprocessedOutput.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud