[PATCH] D99837: [Windows] Turn off text mode correctly in Rewriter to stop CRLF translation

Abhina Sree via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 6 07:49:21 PDT 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG23929af383f2: [Windows] Turn off text mode correctly in Rewriter to stop CRLF translation (authored by abhina.sreeskantharajan).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99837/new/

https://reviews.llvm.org/D99837

Files:
  clang/lib/Frontend/Rewrite/FrontendActions.cpp


Index: clang/lib/Frontend/Rewrite/FrontendActions.cpp
===================================================================
--- clang/lib/Frontend/Rewrite/FrontendActions.cpp
+++ clang/lib/Frontend/Rewrite/FrontendActions.cpp
@@ -194,7 +194,7 @@
 void RewriteTestAction::ExecuteAction() {
   CompilerInstance &CI = getCompilerInstance();
   std::unique_ptr<raw_ostream> OS =
-      CI.createDefaultOutputFile(/*Binary=*/true, getCurrentFileOrBufferName());
+      CI.createDefaultOutputFile(/*Binary=*/false, getCurrentFileOrBufferName());
   if (!OS) return;
 
   DoRewriteTest(CI.getPreprocessor(), OS.get());
@@ -270,7 +270,7 @@
 bool RewriteIncludesAction::BeginSourceFileAction(CompilerInstance &CI) {
   if (!OutputStream) {
     OutputStream =
-        CI.createDefaultOutputFile(/*Binary=*/false, getCurrentFileOrBufferName());
+        CI.createDefaultOutputFile(/*Binary=*/true, getCurrentFileOrBufferName());
     if (!OutputStream)
       return false;
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99837.335510.patch
Type: text/x-patch
Size: 968 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210406/40dc8a2d/attachment.bin>


More information about the cfe-commits mailing list