From: Steve Naroff Date: Tue, 5 Jan 2010 17:33:23 +0000 (+0000) Subject: Fix clang rewriter: return of the mixed line endings, which is X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d57d7c090468712dca447af901eac377711394e5;p=clang Fix clang rewriter: return of the mixed line endings, which is related to clang ObjC rewriter: Line endings still mixed in rewrite output This fix was dropped when I integrated the 'objective-rewrite' branch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92737 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Frontend/FrontendActions.cpp b/lib/Frontend/FrontendActions.cpp index 4c647fda2b..0baba3f467 100644 --- a/lib/Frontend/FrontendActions.cpp +++ b/lib/Frontend/FrontendActions.cpp @@ -280,7 +280,9 @@ void PrintParseAction::ExecuteAction() { void PrintPreprocessedAction::ExecuteAction() { CompilerInstance &CI = getCompilerInstance(); - llvm::raw_ostream *OS = CI.createDefaultOutputFile(false, getCurrentFile()); + // Output file needs to be set to 'Binary', to avoid converting Unix style + // line feeds () to Microsoft style line feeds (). + llvm::raw_ostream *OS = CI.createDefaultOutputFile(true, getCurrentFile()); if (!OS) return; DoPrintPreprocessedInput(CI.getPreprocessor(), OS,