From edf3b277a5f2ebe144827ed47463c22743cac5f9 Mon Sep 17 00:00:00 2001 From: Abhina Sree Date: Thu, 19 Sep 2024 14:30:10 -0400 Subject: [SystemZ][z/OS] Propagate IsText parameter to open text files as text (#107906) This patch adds an IsText parameter to the following functions openFileForRead, getBufferForFile, getBufferForFileImpl and determines whether a file is text by querying the file tag on z/OS. The default is set to OF_Text instead of OF_None, this change in value does not affect any other platforms other than z/OS. --- llvm/unittests/Support/VirtualFileSystemTest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/unittests/Support/VirtualFileSystemTest.cpp') diff --git a/llvm/unittests/Support/VirtualFileSystemTest.cpp b/llvm/unittests/Support/VirtualFileSystemTest.cpp index eb590e4..219aaef 100644 --- a/llvm/unittests/Support/VirtualFileSystemTest.cpp +++ b/llvm/unittests/Support/VirtualFileSystemTest.cpp @@ -67,7 +67,7 @@ public: return I->second; } ErrorOr> - openFileForRead(const Twine &Path) override { + openFileForRead(const Twine &Path, bool IsText = true) override { auto S = status(Path); if (S) return std::unique_ptr(new DummyFile{*S}); @@ -3389,9 +3389,9 @@ TEST(RedirectingFileSystemTest, ExternalPaths) { } llvm::ErrorOr> - openFileForRead(const Twine &Path) override { + openFileForRead(const Twine &Path, bool IsText = true) override { SeenPaths.push_back(Path.str()); - return ProxyFileSystem::openFileForRead(Path); + return ProxyFileSystem::openFileForRead(Path, IsText); } std::error_code isLocal(const Twine &Path, bool &Result) override { -- cgit v1.1