diff options
author | Abhina Sree <Abhina.Sreeskantharajan@ibm.com> | 2024-09-19 14:30:10 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-19 14:30:10 -0400 |
commit | edf3b277a5f2ebe144827ed47463c22743cac5f9 (patch) | |
tree | 99185acc509e869ab34528456e026b06f6594f6b /clang/unittests/Frontend | |
parent | f3f3883f4b9d15770a5ce49956ed4425c71ad69f (diff) | |
download | llvm-edf3b277a5f2ebe144827ed47463c22743cac5f9.zip llvm-edf3b277a5f2ebe144827ed47463c22743cac5f9.tar.gz llvm-edf3b277a5f2ebe144827ed47463c22743cac5f9.tar.bz2 |
[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.
Diffstat (limited to 'clang/unittests/Frontend')
-rw-r--r-- | clang/unittests/Frontend/PCHPreambleTest.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/unittests/Frontend/PCHPreambleTest.cpp b/clang/unittests/Frontend/PCHPreambleTest.cpp index 2ce24c9..137dcf2 100644 --- a/clang/unittests/Frontend/PCHPreambleTest.cpp +++ b/clang/unittests/Frontend/PCHPreambleTest.cpp @@ -36,10 +36,10 @@ class ReadCountingInMemoryFileSystem : public vfs::InMemoryFileSystem std::map<std::string, unsigned> ReadCounts; public: - ErrorOr<std::unique_ptr<vfs::File>> openFileForRead(const Twine &Path) override - { + ErrorOr<std::unique_ptr<vfs::File>> + openFileForRead(const Twine &Path, bool IsText = true) override { ++ReadCounts[Canonicalize(Path)]; - return InMemoryFileSystem::openFileForRead(Path); + return InMemoryFileSystem::openFileForRead(Path, IsText); } unsigned GetReadCount(const Twine &Path) const |