[flang][runtime] Support internal I/O to CHARACTER(KIND/=1)
authorPeter Klausler <pklausler@nvidia.com>
Wed, 3 Aug 2022 19:31:05 +0000 (12:31 -0700)
committerPeter Klausler <pklausler@nvidia.com>
Tue, 9 Aug 2022 15:46:21 +0000 (08:46 -0700)
commitbad52055954e05a6b4cc86e9e950cac0b42f44a9
tree7272324a5959c2cb19c89011dc5be0727e47e900
parent525ff9bd206d7fcd3fee01f31985cd0c9990bfbb
[flang][runtime] Support internal I/O to CHARACTER(KIND/=1)

Allow internal I/O to support non-default kinds of CHARACTER.

The I/O runtime design anticipated this standard feature, but
this patch is somewhat larger than I thought it would be because
many code sites had to have assumptions about units (characters
vs. bytes) brought into harmony, and some encoding utilities
had to be pulled out of IoStatementState and templatized into
their own new header file so that they are available to formatted
output code without having to "thread" an IoStatementState reference
through many call chains.

Differential Revision: https://reviews.llvm.org/D131107
14 files changed:
flang/lib/Semantics/check-io.cpp
flang/runtime/connection.h
flang/runtime/edit-input.cpp
flang/runtime/edit-output.cpp
flang/runtime/emit-encoded.h [new file with mode: 0644]
flang/runtime/format-implementation.h
flang/runtime/format.h
flang/runtime/internal-unit.cpp
flang/runtime/internal-unit.h
flang/runtime/io-stmt.cpp
flang/runtime/io-stmt.h
flang/runtime/namelist.cpp
flang/test/Semantics/io03.f90
flang/unittests/Runtime/Format.cpp