[Flang] Add -fconvert option to swap endianness for unformatted files.
authorJonathon Penix <jpenix@quicinc.com>
Tue, 19 Jul 2022 18:47:25 +0000 (11:47 -0700)
committerJonathon Penix <jpenix@quicinc.com>
Wed, 12 Oct 2022 23:57:37 +0000 (16:57 -0700)
commit0ec3ac9b7fbd15698af7289e1214e8ff3d82ec14
treecc10f920b280aefa9913369c46c4f3b758a2b421
parent74fea6bffeb1724e761ece6b74561fbe4efc8d6d
[Flang] Add -fconvert option to swap endianness for unformatted files.

To accomplish this, this patch creates an optional list of environment
variable default values to be set by the runtime to allow directly using
the existing runtime implementation of FORT_CONVERT for I/O conversions.
29 files changed:
clang/include/clang/Driver/Options.td
clang/lib/Driver/ToolChains/Flang.cpp
flang/examples/external-hello.cpp
flang/include/flang/Frontend/FrontendOptions.h
flang/include/flang/Lower/Bridge.h
flang/include/flang/Lower/EnvironmentDefault.h [new file with mode: 0755]
flang/include/flang/Optimizer/Builder/Runtime/EnvironmentDefaults.h [new file with mode: 0755]
flang/include/flang/Runtime/main.h
flang/lib/Frontend/CompilerInvocation.cpp
flang/lib/Frontend/FrontendActions.cpp
flang/lib/Lower/Bridge.cpp
flang/lib/Optimizer/Builder/CMakeLists.txt
flang/lib/Optimizer/Builder/Runtime/EnvironmentDefaults.cpp [new file with mode: 0755]
flang/runtime/FortranMain/Fortran_main.c
flang/runtime/environment-default-list.h [new file with mode: 0755]
flang/runtime/environment.cpp
flang/runtime/environment.h
flang/runtime/main.cpp
flang/test/Driver/convert.f90 [new file with mode: 0755]
flang/test/Driver/driver-help-hidden.f90
flang/test/Driver/driver-help.f90
flang/test/Driver/emit-mlir.f90
flang/test/Driver/frontend-forwarding.f90
flang/test/Lower/convert.f90 [new file with mode: 0755]
flang/test/Lower/environment-defaults.f90 [new file with mode: 0755]
flang/test/Runtime/no-cpp-dep.c
flang/tools/bbc/bbc.cpp
flang/unittests/Runtime/CommandTest.cpp
flang/unittests/Runtime/Stop.cpp