diff options
author | Abhina Sree <69635948+abhina-sree@users.noreply.github.com> | 2023-12-13 07:46:02 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-13 07:46:02 -0500 |
commit | ab380c287a42c0701cd86ae2932c0cb125b9a294 (patch) | |
tree | 9fdd8fbb8b53602103ee68e953bf69689f156888 /clang/tools/c-index-test/c-index-test.c | |
parent | fd8fa31c55a3413f643443ecf3301441428ce513 (diff) | |
download | llvm-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 'clang/tools/c-index-test/c-index-test.c')
-rw-r--r-- | clang/tools/c-index-test/c-index-test.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c index 2c0c9cb..6fa400a 100644 --- a/clang/tools/c-index-test/c-index-test.c +++ b/clang/tools/c-index-test/c-index-test.c @@ -8,6 +8,7 @@ #include "clang-c/Documentation.h" #include "clang-c/Index.h" #include "clang/Config/config.h" +#include "llvm/Support/AutoConvert.h" #include <assert.h> #include <ctype.h> #include <stdio.h> @@ -5150,6 +5151,14 @@ static void flush_atexit(void) { int main(int argc, const char **argv) { thread_info client_data; +#ifdef __MVS__ + if (enableAutoConversion(fileno(stdout)) == -1) + fprintf(stderr, "Setting conversion on stdout failed\n"); + + if (enableAutoConversion(fileno(stderr)) == -1) + fprintf(stderr, "Setting conversion on stderr failed\n"); +#endif + atexit(flush_atexit); #ifdef CLANG_HAVE_LIBXML |