diff options
author | Sean Perry <39927768+perry-ca@users.noreply.github.com> | 2024-05-01 10:39:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-01 10:39:41 -0400 |
commit | e22ce615fe31a78857a8574c12a32bddc6da465e (patch) | |
tree | 54977d786e1aabf95b0e1cfbf01b57b0893116b5 /llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp | |
parent | 78270cb81bded99bebc6fd8d515bf7cbeff62db4 (diff) | |
download | llvm-e22ce615fe31a78857a8574c12a32bddc6da465e.zip llvm-e22ce615fe31a78857a8574c12a32bddc6da465e.tar.gz llvm-e22ce615fe31a78857a8574c12a32bddc6da465e.tar.bz2 |
[z/OS] treat text files as text files so auto-conversion is done (#90128)
To support auto-conversion on z/OS text files need to be opened as text files. These changes will fix a number of LIT failures due to text files not being converted to the internal code page.
update a number of tools so they open the text files as text files
add support in the cat.py to open a text file as a text file (Windows will continue to treat all files as binary so new lines are handled correctly)
add env var definitions to enable auto-conversion in the lit config file.
Diffstat (limited to 'llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp')
-rw-r--r-- | llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp b/llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp index c3015d8..40ee59c 100644 --- a/llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp +++ b/llvm/lib/ToolDrivers/llvm-lib/LibDriver.cpp @@ -95,7 +95,8 @@ static std::vector<StringRef> getSearchPaths(opt::InputArgList *Args, // Opens a file. Path has to be resolved already. (used for def file) std::unique_ptr<MemoryBuffer> openFile(const Twine &Path) { - ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> MB = MemoryBuffer::getFile(Path); + ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> MB = + MemoryBuffer::getFile(Path, /*IsText=*/true); if (std::error_code EC = MB.getError()) { llvm::errs() << "cannot open file " << Path << ": " << EC.message() << "\n"; |