[llvm] r371683 - [TableGen] Skip CRLF conversion when writing output

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 11 15:33:50 PDT 2019


Author: rnk
Date: Wed Sep 11 15:33:50 2019
New Revision: 371683

URL: http://llvm.org/viewvc/llvm-project?rev=371683&view=rev
Log:
[TableGen] Skip CRLF conversion when writing output

Doing the CRLF translation while writing the file defeats our
optimization to not update the file if it hasn't changed.

Fixes PR43271.

Modified:
    llvm/trunk/lib/TableGen/Main.cpp

Modified: llvm/trunk/lib/TableGen/Main.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/TableGen/Main.cpp?rev=371683&r1=371682&r2=371683&view=diff
==============================================================================
--- llvm/trunk/lib/TableGen/Main.cpp (original)
+++ llvm/trunk/lib/TableGen/Main.cpp Wed Sep 11 15:33:50 2019
@@ -64,7 +64,7 @@ static int createDependencyFile(const TG
     return reportError(argv0, "the option -d must be used together with -o\n");
 
   std::error_code EC;
-  ToolOutputFile DepOut(DependFilename, EC, sys::fs::OF_Text);
+  ToolOutputFile DepOut(DependFilename, EC, sys::fs::OF_None);
   if (EC)
     return reportError(argv0, "error opening " + DependFilename + ":" +
                                   EC.message() + "\n");
@@ -122,7 +122,7 @@ int llvm::TableGenMain(char *argv0, Tabl
       return 0;
 
   std::error_code EC;
-  ToolOutputFile OutFile(OutputFilename, EC, sys::fs::OF_Text);
+  ToolOutputFile OutFile(OutputFilename, EC, sys::fs::OF_None);
   if (EC)
     return reportError(argv0, "error opening " + OutputFilename + ":" +
                                   EC.message() + "\n");




More information about the llvm-commits mailing list