[llvm] [SystemZ][z/OS] Query if a file is text and set the text flag accordingly (PR #109664)

Abhina Sree via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 24 08:41:35 PDT 2024


================
@@ -52,6 +52,12 @@ std::error_code restorezOSStdHandleAutoConversion(int FD);
 /// \brief Set the tag information for a file descriptor.
 std::error_code setzOSFileTag(int FD, int CCSID, bool Text);
 
+// Get the the tag ccsid for a file name or a file descriptor.
+ErrorOr<__ccsid_t> getzOSFileTag(const char *FileName, const int FD = -1);
+
+// Query the file tag to determine if the file is a text file.
+ErrorOr<bool> iszOSTextFile(const char *Filename, const int FD = -1);
----------------
abhina-sree wrote:

As of now, I don't have any other callers, so I can make this change

https://github.com/llvm/llvm-project/pull/109664


More information about the llvm-commits mailing list