From c52435b4a254af96128c19e473071ec30cfb51f2 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Wed, 9 Jan 2013 03:16:42 +0000 Subject: Make sure clang puts tokens from different files on separate lines in "-E -P" mode. llvm-svn: 171944 --- clang/lib/Frontend/PrintPreprocessedOutput.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'clang/lib/Frontend') 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); -- cgit v1.2.3