[cfe-commits] r92737 - /cfe/trunk/lib/Frontend/FrontendActions.cpp

Steve Naroff snaroff at apple.com
Tue Jan 5 09:33:23 PST 2010


Author: snaroff
Date: Tue Jan  5 11:33:23 2010
New Revision: 92737

URL: http://llvm.org/viewvc/llvm-project?rev=92737&view=rev
Log:
Fix <rdar://problem/7490212> clang rewriter: return of the mixed line endings, which is
related to <rdar://problem/6596843> clang ObjC rewriter: Line endings still mixed in rewrite output

This fix was dropped when I integrated the 'objective-rewrite' branch.

Modified:
    cfe/trunk/lib/Frontend/FrontendActions.cpp

Modified: cfe/trunk/lib/Frontend/FrontendActions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/FrontendActions.cpp?rev=92737&r1=92736&r2=92737&view=diff

==============================================================================
--- cfe/trunk/lib/Frontend/FrontendActions.cpp (original)
+++ cfe/trunk/lib/Frontend/FrontendActions.cpp Tue Jan  5 11:33:23 2010
@@ -280,7 +280,9 @@
 
 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 (<LF>) to Microsoft style line feeds (<CR><LF>).
+  llvm::raw_ostream *OS = CI.createDefaultOutputFile(true, getCurrentFile());
   if (!OS) return;
 
   DoPrintPreprocessedInput(CI.getPreprocessor(), OS,





More information about the cfe-commits mailing list