aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/Unix/Program.inc
diff options
context:
space:
mode:
authorAbhina Sree <69635948+abhina-sree@users.noreply.github.com>2023-12-13 07:46:02 -0500
committerGitHub <noreply@github.com>2023-12-13 07:46:02 -0500
commitab380c287a42c0701cd86ae2932c0cb125b9a294 (patch)
tree9fdd8fbb8b53602103ee68e953bf69689f156888 /llvm/lib/Support/Unix/Program.inc
parentfd8fa31c55a3413f643443ecf3301441428ce513 (diff)
downloadllvm-ab380c287a42c0701cd86ae2932c0cb125b9a294.zip
llvm-ab380c287a42c0701cd86ae2932c0cb125b9a294.tar.gz
llvm-ab380c287a42c0701cd86ae2932c0cb125b9a294.tar.bz2
[SystemZ][z/OS] Complete EBCDIC I/O support (#75212)
This patch completes the support for EBCDIC I/O support on z/OS using the autoconversion functions.
Diffstat (limited to 'llvm/lib/Support/Unix/Program.inc')
-rw-r--r--llvm/lib/Support/Unix/Program.inc5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Support/Unix/Program.inc b/llvm/lib/Support/Unix/Program.inc
index 895fdfc..260719b 100644
--- a/llvm/lib/Support/Unix/Program.inc
+++ b/llvm/lib/Support/Unix/Program.inc
@@ -20,6 +20,7 @@
#include "Unix.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Config/config.h"
+#include "llvm/Support/AutoConvert.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/FileSystem.h"
@@ -521,8 +522,12 @@ std::error_code llvm::sys::ChangeStdoutMode(fs::OpenFlags Flags) {
}
std::error_code llvm::sys::ChangeStdinToBinary() {
+#ifdef __MVS__
+ return disableAutoConversion(STDIN_FILENO);
+#else
// Do nothing, as Unix doesn't differentiate between text and binary.
return std::error_code();
+#endif
}
std::error_code llvm::sys::ChangeStdoutToBinary() {