summaryrefslogtreecommitdiff
path: root/llvm/lib/Support/AutoConvert.cpp
AgeCommit message (Collapse)Author
2025-06-13[SystemZ][z/OS] Refactor AutoConvert more (#143955)Abhina Sree
This patch removes the C++ disablezOSAutoConversion,enablezOSAutoConversion declarations and also updates Path.inc to use the common function.
2025-06-11[SystemZ][z/OS] Refactor AutoConvert.h to remove large MVS guard (#143174)Abhina Sree
This AutoConvert.h header frequently gets mislabeled as an unused include because it is guarded by MVS internally and every usage is also guarded. This refactors the change to remove this guard and instead make these functions a noop on other non-z/OS platforms.
2024-12-11[SystemZ][z/OS] Update autoconversion functions to improve support for UTF-8 ↵Abhina Sree
(#98652) This fixes the following error when reading source and header files on z/OS: error: source file is not valid UTF-8
2024-09-20Revert "[SystemZ][z/OS] Propagate IsText parameter to open text files as ↵Abhina Sreeskantharajan
text (#107906)" This reverts commit edf3b277a5f2ebe144827ed47463c22743cac5f9.
2024-09-19[SystemZ][z/OS] Propagate IsText parameter to open text files as text (#107906)Abhina Sree
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.
2024-09-05[NFC][SystemZ][z/OS] Rename autoconversion-related functions to be less ↵Abhina Sree
generic (#107399) This patch renames the functions in AutoConvert.h/cpp to have a less generic name because they are z/OS specific.
2024-03-12[SystemZ][z/OS] Add missing include header to AutoConvert.cpp to fix build ↵Fanbo Meng
(#84909) ba13fa2a5d57581bff1a7e9322234af30f4882f6 added usages of `errnoAsErrorCode()` to AutoConvert.cpp, need to include Error.h header to fix build failure.
2024-03-08[llvm][Support] Add and use errnoAsErrorCode (#84423)Michael Spencer
LLVM is inconsistent about how it converts `errno` to `std::error_code`. This can cause problems because values outside of `std::errc` compare differently if one is system and one is generic on POSIX systems. This is even more of a problem on Windows where use of the system category is just wrong, as that is for Windows errors, which have a completely different mapping than POSIX/generic errors. This patch fixes one instance of this mistake in `JSONTransport.cpp`. This patch adds `errnoAsErrorCode()` which makes it so people do not need to think about this issue in the future. It also cleans up a lot of usage of `errno` in LLVM and Clang.
2023-12-13[SystemZ][z/OS] Complete EBCDIC I/O support (#75212)Abhina Sree
This patch completes the support for EBCDIC I/O support on z/OS using the autoconversion functions.
2021-05-05[SystemZ][z/OS] Fix return values in AutoConversion functionsAbhina Sreeskantharajan
My previous patch https://reviews.llvm.org/rG1527a5e4b4834e65678f9c30f786a2f4c17932bf incorrectly set int return values instead of std::error_code. This patch correctly returns and std::error_code value. Reviewed By: fanbo-meng, Jonathan.Crowther Differential Revision: https://reviews.llvm.org/D101904
2021-05-03[SystemZ][z/OS] Add the functions needed for handling EBCDIC I/OAbhina Sreeskantharajan
This patch adds the basic functions needed for controlling auto conversion on z/OS. Auto conversion is enabled on untagged input file to ASCII by making the assumption that all untagged files are EBCDIC encoded. Output files are auto converted to EBCDIC IBM-1047. This change also enables conversion for stdin/stdout/stderr. For more information on how fcntl controls codepage https://www.ibm.com/docs/en/zos/2.4.0?topic=descriptions-fcntl-bpx1fct-bpx4fct-control-open-file-descriptors Reviewed By: anirudhp Differential Revision: https://reviews.llvm.org/D100483