[flang] Initial UTF-8 support in runtime I/O
authorPeter Klausler <pklausler@nvidia.com>
Wed, 16 Mar 2022 19:32:03 +0000 (12:32 -0700)
committerPeter Klausler <pklausler@nvidia.com>
Tue, 22 Mar 2022 18:48:14 +0000 (11:48 -0700)
commitbafbae238aa1948aa511c734a613a95d89a72546
treee5c839de064663a0b39bb3acae0601d31adc2574
parent54d19ba2084ca366b99b95ed22a6862819c55c49
[flang] Initial UTF-8 support in runtime I/O

Implements UTF-8 encoding and decoding for external units
with OPEN(ENCODING='UTF-8').  This encoding applies to default
CHARACTER values that are not 7-bit ASCII as well as to
the wide CHARACTER kinds 2 and 4.  Basic testing is in place
via direct calls to the runtime I/O APIs, but serious checkout
awaits lowering support of the wide CHARACTER kinds.

Differential Revision: https://reviews.llvm.org/D122038
20 files changed:
flang/include/flang/Runtime/iostat.h
flang/runtime/CMakeLists.txt
flang/runtime/descriptor-io.h
flang/runtime/edit-input.cpp
flang/runtime/edit-input.h
flang/runtime/edit-output.cpp
flang/runtime/edit-output.h
flang/runtime/environment.cpp
flang/runtime/environment.h
flang/runtime/internal-unit.cpp
flang/runtime/internal-unit.h
flang/runtime/io-stmt.cpp
flang/runtime/io-stmt.h
flang/runtime/iostat.cpp
flang/runtime/namelist.cpp
flang/runtime/unit.cpp
flang/runtime/unit.h
flang/runtime/utf.cpp [new file with mode: 0644]
flang/runtime/utf.h [new file with mode: 0644]
flang/unittests/Runtime/ExternalIOTest.cpp