[llvm] 1bcf58b - [SystemZ][z/OS][TableGen] TableGen files should be text

Abhina Sreeskantharajan via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 7 08:23:07 PDT 2021


Author: Abhina Sreeskantharajan
Date: 2021-04-07T11:23:00-04:00
New Revision: 1bcf58b2136d4a5f07f525ba8c3dfabede0af046

URL: https://github.com/llvm/llvm-project/commit/1bcf58b2136d4a5f07f525ba8c3dfabede0af046
DIFF: https://github.com/llvm/llvm-project/commit/1bcf58b2136d4a5f07f525ba8c3dfabede0af046.diff

LOG: [SystemZ][z/OS][TableGen] TableGen files should be text

This patch sets tablegen files as text. It should have no effect on Windows after this patch landed https://reviews.llvm.org/rG82b3e28e836d2f5c8cfd6e1047b93c088522365a.

Reviewed By: anirudhp

Differential Revision: https://reviews.llvm.org/D100036

Added: 
    

Modified: 
    llvm/lib/TableGen/Main.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/TableGen/Main.cpp b/llvm/lib/TableGen/Main.cpp
index a58defaf515f1..0b1024648b66c 100644
--- a/llvm/lib/TableGen/Main.cpp
+++ b/llvm/lib/TableGen/Main.cpp
@@ -93,7 +93,7 @@ int llvm::TableGenMain(const char *argv0, TableGenMainFn *MainFn) {
 
   Records.startTimer("Parse, build records");
   ErrorOr<std::unique_ptr<MemoryBuffer>> FileOrErr =
-      MemoryBuffer::getFileOrSTDIN(InputFilename, /*IsText=*/false);
+      MemoryBuffer::getFileOrSTDIN(InputFilename, /*IsText=*/true);
   if (std::error_code EC = FileOrErr.getError())
     return reportError(argv0, "Could not open input file '" + InputFilename +
                                   "': " + EC.message() + "\n");
@@ -138,7 +138,7 @@ int llvm::TableGenMain(const char *argv0, TableGenMainFn *MainFn) {
     // This prevents recompilation of all the files depending on it if there
     // aren't any.
     if (auto ExistingOrErr =
-            MemoryBuffer::getFile(OutputFilename, /*IsText=*/false))
+            MemoryBuffer::getFile(OutputFilename, /*IsText=*/true))
       if (std::move(ExistingOrErr.get())->getBuffer() == Out.str())
         WriteFile = false;
   }


        


More information about the llvm-commits mailing list