[llvm-branch-commits] [flang] [llvm] [Flang] Move runtime library files to FortranRuntime. NFC (PR #110298)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Oct 7 13:57:43 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-flang-semantics
Author: Michael Kruse (Meinersbur)
<details>
<summary>Changes</summary>
Mostly mechanical changes in preparation of extracting the FortranRuntime "subproject" in #<!-- -->110217. This PR intends to only move pre-existing files to the new folder structure, with no behavioral change.
`Common` and `Testing` are the directories shared by FortranRuntime and Flang. `Runtime` and `module` are going to be used by FortranRuntime only. Files in `Common` that are used only by Flang are moved into `Support`.
Some cosmetic changes and files paths were necessary:
* Relative paths to the new path for the source files and `add_subdirectory`.
* Add the new location's include directory to `include_directories`
* The unittest/Evaluate directory has unitests for FortranRuntime and Flang. A new `CMakeLists.txt` was introduced for the FortranRuntime tests.
* Change the of the `#include` paths relative to the include directive
* clang-format on the `#include` directives
* Since the paths is part if the copyright header and include guards, a script was used to canonicalize those
* `test/Runtime` and runtime tests in `test/Driver` are moved, but the lit.cfg.py mechanism to execute the will only be added in #<!-- -->110217.
---
Patch is 334.25 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/110298.diff
418 Files Affected:
- (added) FortranRuntime/.clang-format (+21)
- (renamed) FortranRuntime/cmake/config.h.cmake.in ()
- (renamed) FortranRuntime/include/flang/Common/Fortran-consts.h ()
- (renamed) FortranRuntime/include/flang/Common/ISO_Fortran_binding_wrapper.h (+7-8)
- (renamed) FortranRuntime/include/flang/Common/api-attrs.h (+5-6)
- (renamed) FortranRuntime/include/flang/Common/binary-floating-point.h (+4-4)
- (renamed) FortranRuntime/include/flang/Common/bit-population-count.h (+1-1)
- (renamed) FortranRuntime/include/flang/Common/constexpr-bitset.h (+1-1)
- (renamed) FortranRuntime/include/flang/Common/decimal.h (+5-6)
- (renamed) FortranRuntime/include/flang/Common/enum-class.h (+1-1)
- (renamed) FortranRuntime/include/flang/Common/enum-set.h (+1-1)
- (renamed) FortranRuntime/include/flang/Common/fast-int-set.h (+2-2)
- (renamed) FortranRuntime/include/flang/Common/float128.h (+1-1)
- (renamed) FortranRuntime/include/flang/Common/format.h (+1-1)
- (renamed) FortranRuntime/include/flang/Common/idioms.h (+1-1)
- (renamed) FortranRuntime/include/flang/Common/leading-zero-bit-count.h (+1-1)
- (renamed) FortranRuntime/include/flang/Common/magic-numbers.h (+3-3)
- (renamed) FortranRuntime/include/flang/Common/optional.h (+3-3)
- (renamed) FortranRuntime/include/flang/Common/real.h (+1-1)
- (renamed) FortranRuntime/include/flang/Common/reference-wrapper.h (+3-3)
- (renamed) FortranRuntime/include/flang/Common/restorer.h (+2-2)
- (renamed) FortranRuntime/include/flang/Common/target-rounding.h ()
- (renamed) FortranRuntime/include/flang/Common/uint128.h (+2-2)
- (renamed) FortranRuntime/include/flang/Common/variant.h (+3-3)
- (renamed) FortranRuntime/include/flang/Common/visit.h (+2-2)
- (renamed) FortranRuntime/include/flang/Common/windows-include.h (+1-1)
- (renamed) FortranRuntime/include/flang/Runtime/CUDA/allocator.h (+1-1)
- (renamed) FortranRuntime/include/flang/Runtime/CUDA/descriptor.h (+1-1)
- (renamed) FortranRuntime/include/flang/Runtime/allocatable.h (+1-1)
- (renamed) FortranRuntime/include/flang/Runtime/allocator-registry.h (+4-4)
- (renamed) FortranRuntime/include/flang/Runtime/array-constructor.h (+3-3)
- (renamed) FortranRuntime/include/flang/Runtime/assign.h (+1-1)
- (renamed) FortranRuntime/include/flang/Runtime/c-or-cpp.h (+1-1)
- (renamed) FortranRuntime/include/flang/Runtime/character.h (+1-1)
- (renamed) FortranRuntime/include/flang/Runtime/command.h (+1-1)
- (renamed) FortranRuntime/include/flang/Runtime/cpp-type.h (+1-1)
- (renamed) FortranRuntime/include/flang/Runtime/derived-api.h (+1-1)
- (renamed) FortranRuntime/include/flang/Runtime/descriptor.h (+2-2)
- (renamed) FortranRuntime/include/flang/Runtime/entry-names.h (+5-6)
- (renamed) FortranRuntime/include/flang/Runtime/exceptions.h (+2-2)
- (renamed) FortranRuntime/include/flang/Runtime/execute.h (+2-2)
- (renamed) FortranRuntime/include/flang/Runtime/extensions.h (+1-1)
- (renamed) FortranRuntime/include/flang/Runtime/freestanding-tools.h (+1-1)
- (renamed) FortranRuntime/include/flang/Runtime/inquiry.h (+2-2)
- (renamed) FortranRuntime/include/flang/Runtime/io-api.h (+2-2)
- (renamed) FortranRuntime/include/flang/Runtime/iostat.h (+2-2)
- (renamed) FortranRuntime/include/flang/Runtime/main.h (+1-1)
- (renamed) FortranRuntime/include/flang/Runtime/matmul-instances.inc ()
- (renamed) FortranRuntime/include/flang/Runtime/matmul-transpose.h (+1-1)
- (renamed) FortranRuntime/include/flang/Runtime/matmul.h (+1-1)
- (renamed) FortranRuntime/include/flang/Runtime/memory.h (+1-1)
- (renamed) FortranRuntime/include/flang/Runtime/misc-intrinsic.h (+1-1)
- (renamed) FortranRuntime/include/flang/Runtime/numeric.h (+1-1)
- (renamed) FortranRuntime/include/flang/Runtime/pointer.h (+1-1)
- (renamed) FortranRuntime/include/flang/Runtime/ragged.h (+2-2)
- (renamed) FortranRuntime/include/flang/Runtime/random.h (+5)
- (renamed) FortranRuntime/include/flang/Runtime/reduce.h (+1-1)
- (renamed) FortranRuntime/include/flang/Runtime/reduction.h (+1-1)
- (renamed) FortranRuntime/include/flang/Runtime/stop.h (+1-1)
- (renamed) FortranRuntime/include/flang/Runtime/support.h (+2-2)
- (renamed) FortranRuntime/include/flang/Runtime/temporary-stack.h (+1-1)
- (renamed) FortranRuntime/include/flang/Runtime/time-intrinsic.h (+1-1)
- (renamed) FortranRuntime/include/flang/Runtime/transformational.h (+1-1)
- (renamed) FortranRuntime/include/flang/Runtime/type-code.h (+2-2)
- (renamed) FortranRuntime/include/flang/Testing/fp-testing.h (+11-3)
- (renamed) FortranRuntime/include/flang/Testing/testing.h (+11-3)
- (renamed) FortranRuntime/lib/Common/big-radix-floating-point.h (+6-6)
- (renamed) FortranRuntime/lib/Common/binary-to-decimal.cpp (+2-2)
- (renamed) FortranRuntime/lib/Common/decimal-to-binary.cpp (+3-3)
- (renamed) FortranRuntime/lib/Runtime/CMakeLists.txt (+5-4)
- (renamed) FortranRuntime/lib/Runtime/CUDA/CMakeLists.txt (+1-1)
- (renamed) FortranRuntime/lib/Runtime/CUDA/allocator.cpp (+2-2)
- (renamed) FortranRuntime/lib/Runtime/CUDA/descriptor.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/CMakeLists.txt (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/acos.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/acosh.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/asin.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/asinh.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/atan.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/atan2.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/atanh.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/ceil.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/complex-math.c (+2-3)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/complex-math.h (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/cos.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/cosh.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/erf.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/erfc.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/exp.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/exponent.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/floor.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/fma.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/fraction.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/hypot.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/j0.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/j1.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/jn.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/lgamma.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/llround.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/log.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/log10.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/lround.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/math-entries.h (+4-4)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/mod-real.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/modulo-real.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/nearest.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/norm2.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/numeric-template-specs.h (+2-2)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/pow.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/random.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/round.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/rrspacing.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/scale.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/set-exponent.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/sin.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/sinh.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/spacing.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/sqrt.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/tan.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/tanh.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/tgamma.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/trunc.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/y0.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/y1.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/Float128Math/yn.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/ISO_Fortran_binding.cpp (+3-3)
- (renamed) FortranRuntime/lib/Runtime/ISO_Fortran_util.h (+4-4)
- (renamed) FortranRuntime/lib/Runtime/allocatable.cpp (+4-4)
- (renamed) FortranRuntime/lib/Runtime/allocator-registry.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/array-constructor.cpp (+4-4)
- (renamed) FortranRuntime/lib/Runtime/assign-impl.h (+2-2)
- (renamed) FortranRuntime/lib/Runtime/assign.cpp (+2-2)
- (renamed) FortranRuntime/lib/Runtime/buffer.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/buffer.h (+3-3)
- (renamed) FortranRuntime/lib/Runtime/character.cpp (+3-3)
- (renamed) FortranRuntime/lib/Runtime/command.cpp (+2-2)
- (renamed) FortranRuntime/lib/Runtime/complex-powi.cpp (+7-8)
- (renamed) FortranRuntime/lib/Runtime/complex-reduction.c (+2-3)
- (renamed) FortranRuntime/lib/Runtime/complex-reduction.h (+3-4)
- (renamed) FortranRuntime/lib/Runtime/connection.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/connection.h (+5-5)
- (renamed) FortranRuntime/lib/Runtime/copy.cpp (+3-3)
- (renamed) FortranRuntime/lib/Runtime/copy.h (+2-2)
- (renamed) FortranRuntime/lib/Runtime/derived-api.cpp (+2-3)
- (renamed) FortranRuntime/lib/Runtime/derived.cpp (+2-2)
- (renamed) FortranRuntime/lib/Runtime/derived.h (+2-2)
- (renamed) FortranRuntime/lib/Runtime/descriptor-io.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/descriptor-io.h (+6-6)
- (renamed) FortranRuntime/lib/Runtime/descriptor.cpp (+2-2)
- (renamed) FortranRuntime/lib/Runtime/dot-product.cpp (+4-4)
- (renamed) FortranRuntime/lib/Runtime/edit-input.cpp (+3-3)
- (renamed) FortranRuntime/lib/Runtime/edit-input.h (+3-3)
- (renamed) FortranRuntime/lib/Runtime/edit-output.cpp (+2-2)
- (renamed) FortranRuntime/lib/Runtime/edit-output.h (+4-4)
- (renamed) FortranRuntime/lib/Runtime/emit-encoded.h (+2-2)
- (renamed) FortranRuntime/lib/Runtime/environment-default-list.h (+2-3)
- (renamed) FortranRuntime/lib/Runtime/environment.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/environment.h (+3-3)
- (renamed) FortranRuntime/lib/Runtime/exceptions.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/execute.cpp (+2-2)
- (renamed) FortranRuntime/lib/Runtime/extensions.cpp (+3-3)
- (renamed) FortranRuntime/lib/Runtime/external-unit.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/extrema.cpp (+2-2)
- (renamed) FortranRuntime/lib/Runtime/file.cpp (+2-2)
- (renamed) FortranRuntime/lib/Runtime/file.h (+3-3)
- (renamed) FortranRuntime/lib/Runtime/findloc.cpp (+2-2)
- (renamed) FortranRuntime/lib/Runtime/format-implementation.h (+5-5)
- (renamed) FortranRuntime/lib/Runtime/format.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/format.h (+4-4)
- (renamed) FortranRuntime/lib/Runtime/inquiry.cpp (+2-2)
- (renamed) FortranRuntime/lib/Runtime/internal-unit.cpp (+2-2)
- (renamed) FortranRuntime/lib/Runtime/internal-unit.h (+4-4)
- (renamed) FortranRuntime/lib/Runtime/io-api-common.h (+7-7)
- (renamed) FortranRuntime/lib/Runtime/io-api-minimal.cpp (+2-2)
- (renamed) FortranRuntime/lib/Runtime/io-api.cpp (+4-4)
- (renamed) FortranRuntime/lib/Runtime/io-error.cpp (+2-2)
- (renamed) FortranRuntime/lib/Runtime/io-error.h (+3-3)
- (renamed) FortranRuntime/lib/Runtime/io-stmt.cpp (+2-2)
- (renamed) FortranRuntime/lib/Runtime/io-stmt.h (+5-5)
- (renamed) FortranRuntime/lib/Runtime/iostat.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/iso_fortran_env_impl.f90 (+1-1)
- (renamed) FortranRuntime/lib/Runtime/lock.h (+2-2)
- (renamed) FortranRuntime/lib/Runtime/main.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/matmul-transpose.cpp (+3-3)
- (renamed) FortranRuntime/lib/Runtime/matmul.cpp (+3-3)
- (renamed) FortranRuntime/lib/Runtime/memory.cpp (+2-2)
- (renamed) FortranRuntime/lib/Runtime/misc-intrinsic.cpp (+3-3)
- (renamed) FortranRuntime/lib/Runtime/namelist.cpp (+2-2)
- (renamed) FortranRuntime/lib/Runtime/namelist.h (+3-3)
- (renamed) FortranRuntime/lib/Runtime/non-tbp-dio.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/non-tbp-dio.h (+2-2)
- (renamed) FortranRuntime/lib/Runtime/numeric-templates.h (+4-4)
- (renamed) FortranRuntime/lib/Runtime/numeric.cpp (+2-2)
- (renamed) FortranRuntime/lib/Runtime/pointer.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/product.cpp (+2-2)
- (renamed) FortranRuntime/lib/Runtime/pseudo-unit.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/ragged.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/random-templates.h (+4-4)
- (renamed) FortranRuntime/lib/Runtime/random.cpp (+4-4)
- (renamed) FortranRuntime/lib/Runtime/reduce.cpp (+2-2)
- (renamed) FortranRuntime/lib/Runtime/reduction-templates.h (+4-4)
- (renamed) FortranRuntime/lib/Runtime/reduction.cpp (+2-2)
- (renamed) FortranRuntime/lib/Runtime/stack.h (+5-5)
- (renamed) FortranRuntime/lib/Runtime/stat.cpp (+2-2)
- (renamed) FortranRuntime/lib/Runtime/stat.h (+4-4)
- (renamed) FortranRuntime/lib/Runtime/stop.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/sum.cpp (+2-2)
- (renamed) FortranRuntime/lib/Runtime/support.cpp (+2-2)
- (renamed) FortranRuntime/lib/Runtime/temporary-stack.cpp (+3-3)
- (renamed) FortranRuntime/lib/Runtime/terminator.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/terminator.h (+2-2)
- (renamed) FortranRuntime/lib/Runtime/time-intrinsic.cpp (+3-3)
- (renamed) FortranRuntime/lib/Runtime/tools.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/tools.h (+4-4)
- (renamed) FortranRuntime/lib/Runtime/transformational.cpp (+3-3)
- (renamed) FortranRuntime/lib/Runtime/type-code.cpp (+2-1)
- (renamed) FortranRuntime/lib/Runtime/type-info.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/type-info.h (+3-3)
- (renamed) FortranRuntime/lib/Runtime/unit-map.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/unit-map.h (+4-4)
- (renamed) FortranRuntime/lib/Runtime/unit.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/unit.h (+7-7)
- (renamed) FortranRuntime/lib/Runtime/utf.cpp (+1-1)
- (renamed) FortranRuntime/lib/Runtime/utf.h (+2-2)
- (renamed) FortranRuntime/lib/Testing/fp-testing.cpp (+10-2)
- (renamed) FortranRuntime/lib/Testing/testing.cpp (+9-1)
- (renamed) FortranRuntime/test/Driver/ctofortran.f90 ()
- (renamed) FortranRuntime/test/Driver/exec.f90 ()
- (renamed) FortranRuntime/test/Runtime/no-cpp-dep.c ()
- (added) FortranRuntime/unittests/Common/CMakeLists.txt (+11)
- (renamed) FortranRuntime/unittests/Common/FastIntSetTest.cpp (+2-2)
- (added) FortranRuntime/unittests/Decimal/CMakeLists.txt (+18)
- (renamed) FortranRuntime/unittests/Decimal/quick-sanity-test.cpp (+9-1)
- (renamed) FortranRuntime/unittests/Decimal/thorough-test.cpp (+9-1)
- (added) FortranRuntime/unittests/Evaluate/CMakeLists.txt (+14)
- (renamed) FortranRuntime/unittests/Evaluate/ISO-Fortran-binding.cpp (+10-2)
- (renamed) FortranRuntime/unittests/Evaluate/reshape.cpp (+9-1)
- (renamed) FortranRuntime/unittests/Runtime/AccessTest.cpp (+2-2)
- (renamed) FortranRuntime/unittests/Runtime/Allocatable.cpp (+2-2)
- (renamed) FortranRuntime/unittests/Runtime/ArrayConstructor.cpp (+3-3)
- (renamed) FortranRuntime/unittests/Runtime/BufferTest.cpp (+2-2)
- (renamed) FortranRuntime/unittests/Runtime/CMakeLists.txt (+8)
- (renamed) FortranRuntime/unittests/Runtime/CUDA/AllocatorCUF.cpp (+3-3)
- (added) FortranRuntime/unittests/Runtime/CUDA/CMakeLists.txt (+23)
- (renamed) FortranRuntime/unittests/Runtime/CharacterTest.cpp (+2-2)
- (renamed) FortranRuntime/unittests/Runtime/CommandTest.cpp (+3-3)
- (renamed) FortranRuntime/unittests/Runtime/Complex.cpp (+1-1)
- (renamed) FortranRuntime/unittests/Runtime/CrashHandlerFixture.cpp (+2-2)
- (renamed) FortranRuntime/unittests/Runtime/CrashHandlerFixture.h (+4-4)
- (renamed) FortranRuntime/unittests/Runtime/Derived.cpp (+3-3)
- (renamed) FortranRuntime/unittests/Runtime/ExternalIOTest.cpp (+2-2)
- (renamed) FortranRuntime/unittests/Runtime/Format.cpp (+4-4)
- (renamed) FortranRuntime/unittests/Runtime/Inquiry.cpp (+3-3)
- (renamed) FortranRuntime/unittests/Runtime/ListInputTest.cpp (+2-2)
- (renamed) FortranRuntime/unittests/Runtime/LogicalFormatTest.cpp (+1-1)
- (renamed) FortranRuntime/unittests/Runtime/Matmul.cpp (+3-3)
- (renamed) FortranRuntime/unittests/Runtime/MatmulTranspose.cpp (+3-3)
- (renamed) FortranRuntime/unittests/Runtime/MiscIntrinsic.cpp (+3-3)
- (renamed) FortranRuntime/unittests/Runtime/Namelist.cpp (+3-3)
- (renamed) FortranRuntime/unittests/Runtime/Numeric.cpp (+2-2)
- (renamed) FortranRuntime/unittests/Runtime/NumericalFormatTest.cpp (+1-1)
- (renamed) FortranRuntime/unittests/Runtime/Pointer.cpp (+3-3)
- (renamed) FortranRuntime/unittests/Runtime/Ragged.cpp (+1-1)
- (renamed) FortranRuntime/unittests/Runtime/Random.cpp (+2-2)
- (renamed) FortranRuntime/unittests/Runtime/Reduction.cpp (+3-3)
- (renamed) FortranRuntime/unittests/Runtime/RuntimeCrashTest.cpp (+3-3)
- (renamed) FortranRuntime/unittests/Runtime/Stop.cpp (+2-2)
- (renamed) FortranRuntime/unittests/Runtime/Support.cpp (+3-3)
- (renamed) FortranRuntime/unittests/Runtime/TemporaryStack.cpp (+4-4)
- (renamed) FortranRuntime/unittests/Runtime/Time.cpp (+2-2)
- (renamed) FortranRuntime/unittests/Runtime/Transformational.cpp (+3-3)
- (renamed) FortranRuntime/unittests/Runtime/tools.h (+3-3)
- (modified) flang/CMakeLists.txt (+3-2)
- (modified) flang/include/flang/Evaluate/call.h (+3-3)
- (modified) flang/include/flang/Evaluate/characteristics.h (+3-3)
- (modified) flang/include/flang/Evaluate/common.h (+4-4)
- (modified) flang/include/flang/Evaluate/constant.h (+2-2)
- (modified) flang/include/flang/Evaluate/expression.h (+3-3)
- (modified) flang/include/flang/Evaluate/formatting.h (+1-1)
- (modified) flang/include/flang/Evaluate/intrinsics.h (+1-1)
- (modified) flang/include/flang/Evaluate/shape.h (+1-1)
- (modified) flang/include/flang/Evaluate/target.h (+1-1)
- (modified) flang/include/flang/Evaluate/tools.h (+2-2)
- (modified) flang/include/flang/Evaluate/traverse.h (+1-1)
- (modified) flang/include/flang/Evaluate/type.h (+3-3)
- (modified) flang/include/flang/Evaluate/variable.h (+2-2)
- (modified) flang/include/flang/Frontend/FrontendOptions.h (+1-1)
- (modified) flang/include/flang/ISO_Fortran_binding.h (+6-7)
- (modified) flang/include/flang/Lower/AbstractConverter.h (+1-1)
- (modified) flang/include/flang/Lower/Bridge.h (+1-1)
- (modified) flang/include/flang/Lower/CallInterface.h (+1-1)
- (modified) flang/include/flang/Lower/ConvertType.h (+1-1)
- (modified) flang/include/flang/Lower/LoweringOptions.h (+1-1)
- (modified) flang/include/flang/Lower/PFTBuilder.h (+2-2)
- (modified) flang/include/flang/Lower/Support/Utils.h (+1-1)
- (modified) flang/include/flang/Lower/SymbolMap.h (+1-1)
- (modified) flang/include/flang/Optimizer/Builder/FIRBuilder.h (+1-1)
- (modified) flang/include/flang/Optimizer/Builder/IntrinsicCall.h (+1)
- (modified) flang/include/flang/Optimizer/Builder/PPCIntrinsicCall.h (+1-1)
- (modified) flang/include/flang/Optimizer/Builder/Runtime/RTBuilder.h (+1-1)
- (modified) flang/include/flang/Optimizer/CodeGen/DescriptorModel.h (+1-1)
- (modified) flang/include/flang/Optimizer/Dialect/CUF/Attributes/CUFAttr.h (+1-1)
- (modified) flang/include/flang/Optimizer/Support/TypeCode.h (+1-1)
- (modified) flang/include/flang/Optimizer/Support/Utils.h (+1-1)
- (modified) flang/include/flang/Parser/char-block.h (+1-1)
- (modified) flang/include/flang/Parser/dump-parse-tree.h (+2-2)
- (modified) flang/include/flang/Parser/message.h (+1-1)
- (modified) flang/include/flang/Parser/parse-state.h (+1-1)
- (modified) flang/include/flang/Parser/parse-tree.h (+2-2)
- (modified) flang/include/flang/Parser/parsing.h (+1-1)
- (modified) flang/include/flang/Parser/provenance.h (+1-1)
``````````diff
diff --git a/FortranRuntime/.clang-format b/FortranRuntime/.clang-format
new file mode 100644
index 00000000000000..c1dfe06fdf5782
--- /dev/null
+++ b/FortranRuntime/.clang-format
@@ -0,0 +1,21 @@
+---
+# See: https://clang.llvm.org/docs/ClangFormatStyleOptions.html
+BasedOnStyle: LLVM
+AlignAfterOpenBracket: DontAlign
+AlignEscapedNewlines: DontAlign
+AlignConsecutiveAssignments: false
+AlignConsecutiveDeclarations: false
+AlignOperands: false
+AlignTrailingComments: false
+IncludeCategories:
+ - Regex: '^<'
+ Priority: 4
+ - Regex: '^"(llvm|llvm-c|clang|clang-c)/'
+ Priority: 3
+ - Regex: '^"(flang|\.\.)/'
+ Priority: 2
+ - Regex: '.*'
+ Priority: 1
+...
+
+# vim:set filetype=yaml:
diff --git a/flang/runtime/config.h.cmake b/FortranRuntime/cmake/config.h.cmake.in
similarity index 100%
rename from flang/runtime/config.h.cmake
rename to FortranRuntime/cmake/config.h.cmake.in
diff --git a/flang/include/flang/Common/Fortran-consts.h b/FortranRuntime/include/flang/Common/Fortran-consts.h
similarity index 100%
rename from flang/include/flang/Common/Fortran-consts.h
rename to FortranRuntime/include/flang/Common/Fortran-consts.h
diff --git a/flang/include/flang/ISO_Fortran_binding_wrapper.h b/FortranRuntime/include/flang/Common/ISO_Fortran_binding_wrapper.h
similarity index 70%
rename from flang/include/flang/ISO_Fortran_binding_wrapper.h
rename to FortranRuntime/include/flang/Common/ISO_Fortran_binding_wrapper.h
index 37289bdbabd03c..2c0fdc123c8759 100644
--- a/flang/include/flang/ISO_Fortran_binding_wrapper.h
+++ b/FortranRuntime/include/flang/Common/ISO_Fortran_binding_wrapper.h
@@ -1,14 +1,13 @@
-/*===-- include/flang/ISO_Fortran_binding_wrapper.h ---------------*- C++ -*-===
+/*===-- include/flang/Common/ISO_Fortran_binding_wrapper.h ----------*- C -*-===
*
* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
* See https://llvm.org/LICENSE.txt for license information.
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
*
- * ===-----------------------------------------------------------------------===
- */
+ *===----------------------------------------------------------------------===*/
-#ifndef FORTRAN_ISO_FORTRAN_BINDING_WRAPPER_H_
-#define FORTRAN_ISO_FORTRAN_BINDING_WRAPPER_H_
+#ifndef FORTRAN_COMMON_ISO_FORTRAN_BINDING_WRAPPER_H_
+#define FORTRAN_COMMON_ISO_FORTRAN_BINDING_WRAPPER_H_
/* A thin wrapper around flang/include/ISO_Fortran_binding.h
* This header file must be included when ISO_Fortran_binding.h
@@ -23,17 +22,17 @@
/* clang-format off */
#include <stddef.h>
-#include "Common/api-attrs.h"
+#include "flang/Common/api-attrs.h"
#ifdef __cplusplus
namespace Fortran {
namespace ISO {
#define FORTRAN_ISO_NAMESPACE_ ::Fortran::ISO
#endif /* __cplusplus */
-#include "ISO_Fortran_binding.h"
+#include "flang/ISO_Fortran_binding.h"
#ifdef __cplusplus
} // namespace ISO
} // namespace Fortran
#endif /* __cplusplus */
/* clang-format on */
-#endif /* FORTRAN_ISO_FORTRAN_BINDING_WRAPPER_H_ */
+#endif /* FORTRAN_COMMON_ISO_FORTRAN_BINDING_WRAPPER_H_ */
diff --git a/flang/include/flang/Common/api-attrs.h b/FortranRuntime/include/flang/Common/api-attrs.h
similarity index 97%
rename from flang/include/flang/Common/api-attrs.h
rename to FortranRuntime/include/flang/Common/api-attrs.h
index d73e60996bc81f..9a3001fb255c11 100644
--- a/flang/include/flang/Common/api-attrs.h
+++ b/FortranRuntime/include/flang/Common/api-attrs.h
@@ -1,11 +1,10 @@
-/*===-- include/flang/Common/api-attrs.h ---------------------------*- C -*-=//
+/*===-- include/flang/Common/api-attrs.h ----------------------------*- C -*-===
*
* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
* See https://llvm.org/LICENSE.txt for license information.
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
*
- *===------------------------------------------------------------------------===
- */
+ *===----------------------------------------------------------------------===*/
/*
* The file defines a set macros that can be used to apply
@@ -13,8 +12,8 @@
* declared/defined/used in Flang runtime library.
*/
-#ifndef FORTRAN_RUNTIME_API_ATTRS_H_
-#define FORTRAN_RUNTIME_API_ATTRS_H_
+#ifndef FORTRAN_COMMON_API_ATTRS_H_
+#define FORTRAN_COMMON_API_ATTRS_H_
/*
* RT_EXT_API_GROUP_BEGIN/END pair is placed around definitions
@@ -178,4 +177,4 @@
#define RT_DEVICE_NOINLINE_HOST_INLINE inline
#endif
-#endif /* !FORTRAN_RUNTIME_API_ATTRS_H_ */
+#endif /* FORTRAN_COMMON_API_ATTRS_H_ */
diff --git a/flang/include/flang/Decimal/binary-floating-point.h b/FortranRuntime/include/flang/Common/binary-floating-point.h
similarity index 96%
rename from flang/include/flang/Decimal/binary-floating-point.h
rename to FortranRuntime/include/flang/Common/binary-floating-point.h
index 1e0cde97d98e61..705acc31bdfb21 100644
--- a/flang/include/flang/Decimal/binary-floating-point.h
+++ b/FortranRuntime/include/flang/Common/binary-floating-point.h
@@ -1,4 +1,4 @@
-//===-- include/flang/Decimal/binary-floating-point.h -----------*- C++ -*-===//
+//===-- include/flang/Common/binary-floating-point.h ------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef FORTRAN_DECIMAL_BINARY_FLOATING_POINT_H_
-#define FORTRAN_DECIMAL_BINARY_FLOATING_POINT_H_
+#ifndef FORTRAN_COMMON_BINARY_FLOATING_POINT_H_
+#define FORTRAN_COMMON_BINARY_FLOATING_POINT_H_
// Access and manipulate the fields of an IEEE-754 binary
// floating-point value via a generalized template.
@@ -208,4 +208,4 @@ template <int BINARY_PRECISION> class BinaryFloatingPointNumber {
RawType raw_{0};
};
} // namespace Fortran::decimal
-#endif
+#endif /* FORTRAN_COMMON_BINARY_FLOATING_POINT_H_ */
diff --git a/flang/include/flang/Common/bit-population-count.h b/FortranRuntime/include/flang/Common/bit-population-count.h
similarity index 98%
rename from flang/include/flang/Common/bit-population-count.h
rename to FortranRuntime/include/flang/Common/bit-population-count.h
index e1aeb78f9a3765..59ade914d14d85 100644
--- a/flang/include/flang/Common/bit-population-count.h
+++ b/FortranRuntime/include/flang/Common/bit-population-count.h
@@ -93,4 +93,4 @@ template <typename INT> inline constexpr int TrailingZeroBitCount(INT x) {
}
}
} // namespace Fortran::common
-#endif // FORTRAN_COMMON_BIT_POPULATION_COUNT_H_
+#endif /* FORTRAN_COMMON_BIT_POPULATION_COUNT_H_ */
diff --git a/flang/include/flang/Common/constexpr-bitset.h b/FortranRuntime/include/flang/Common/constexpr-bitset.h
similarity index 98%
rename from flang/include/flang/Common/constexpr-bitset.h
rename to FortranRuntime/include/flang/Common/constexpr-bitset.h
index 1aafb6eff84c61..093b247b5f4eff 100644
--- a/flang/include/flang/Common/constexpr-bitset.h
+++ b/FortranRuntime/include/flang/Common/constexpr-bitset.h
@@ -144,4 +144,4 @@ template <int BITS> class BitSet {
Word bits_{0};
};
} // namespace Fortran::common
-#endif // FORTRAN_COMMON_CONSTEXPR_BITSET_H_
+#endif /* FORTRAN_COMMON_CONSTEXPR_BITSET_H_ */
diff --git a/flang/include/flang/Decimal/decimal.h b/FortranRuntime/include/flang/Common/decimal.h
similarity index 95%
rename from flang/include/flang/Decimal/decimal.h
rename to FortranRuntime/include/flang/Common/decimal.h
index 443163d058e28b..c086f97129f6a5 100644
--- a/flang/include/flang/Decimal/decimal.h
+++ b/FortranRuntime/include/flang/Common/decimal.h
@@ -1,16 +1,15 @@
-/*===-- include/flang/Decimal/decimal.h ---------------------------*- C++ -*-===
+/*===-- include/flang/Common/decimal.h ------------------------------*- C -*-===
*
* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
* See https://llvm.org/LICENSE.txt for license information.
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
*
- * ===-----------------------------------------------------------------------===
- */
+ *===----------------------------------------------------------------------===*/
/* C and C++ API for binary-to/from-decimal conversion package. */
-#ifndef FORTRAN_DECIMAL_DECIMAL_H_
-#define FORTRAN_DECIMAL_DECIMAL_H_
+#ifndef FORTRAN_COMMON_DECIMAL_H_
+#define FORTRAN_COMMON_DECIMAL_H_
#include "flang/Common/api-attrs.h"
#include <stddef.h>
@@ -137,4 +136,4 @@ RT_API_ATTRS enum NS(ConversionResultFlags) ConvertDecimalToLongDouble(
#ifdef __cplusplus
} // extern "C"
#endif
-#endif
+#endif /* FORTRAN_COMMON_DECIMAL_H_ */
diff --git a/flang/include/flang/Common/enum-class.h b/FortranRuntime/include/flang/Common/enum-class.h
similarity index 98%
rename from flang/include/flang/Common/enum-class.h
rename to FortranRuntime/include/flang/Common/enum-class.h
index 41575d45091a8d..787648ffec48e8 100644
--- a/flang/include/flang/Common/enum-class.h
+++ b/FortranRuntime/include/flang/Common/enum-class.h
@@ -69,4 +69,4 @@ constexpr std::array<std::string_view, ITEMS> EnumNames(const char *p) {
}
} // namespace Fortran::common
-#endif // FORTRAN_COMMON_ENUM_CLASS_H_
+#endif /* FORTRAN_COMMON_ENUM_CLASS_H_ */
diff --git a/flang/include/flang/Common/enum-set.h b/FortranRuntime/include/flang/Common/enum-set.h
similarity index 99%
rename from flang/include/flang/Common/enum-set.h
rename to FortranRuntime/include/flang/Common/enum-set.h
index 5290b76debee88..6100fc5e2e31c5 100644
--- a/flang/include/flang/Common/enum-set.h
+++ b/FortranRuntime/include/flang/Common/enum-set.h
@@ -228,4 +228,4 @@ struct std::hash<Fortran::common::EnumSet<ENUM, values>> {
return std::hash(x.bitset());
}
};
-#endif // FORTRAN_COMMON_ENUM_SET_H_
+#endif /* FORTRAN_COMMON_ENUM_SET_H_ */
diff --git a/flang/include/flang/Common/fast-int-set.h b/FortranRuntime/include/flang/Common/fast-int-set.h
similarity index 97%
rename from flang/include/flang/Common/fast-int-set.h
rename to FortranRuntime/include/flang/Common/fast-int-set.h
index d1c9c756a44a65..323ee4dc7e94d9 100644
--- a/flang/include/flang/Common/fast-int-set.h
+++ b/FortranRuntime/include/flang/Common/fast-int-set.h
@@ -1,4 +1,4 @@
-//===-- include/flang/Common/fast-int-set.h --------------------*- C++ -*-===//
+//===-- include/flang/Common/fast-int-set.h ---------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -103,4 +103,4 @@ template <int N> class FastIntSet {
bool isFullyInitialized_{false}; // memory was cleared
};
} // namespace Fortran::common
-#endif // FORTRAN_COMMON_FAST_INT_SET_H_
+#endif /* FORTRAN_COMMON_FAST_INT_SET_H_ */
diff --git a/flang/include/flang/Common/float128.h b/FortranRuntime/include/flang/Common/float128.h
similarity index 96%
rename from flang/include/flang/Common/float128.h
rename to FortranRuntime/include/flang/Common/float128.h
index 2e76bc0a162e61..a7036bf679e5ae 100644
--- a/flang/include/flang/Common/float128.h
+++ b/FortranRuntime/include/flang/Common/float128.h
@@ -1,4 +1,4 @@
-/*===-- flang/Common/float128.h ----------------------------------*- C -*-===
+/*===-- include/flang/Common/float128.h -----------------------------*- C -*-===
*
* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
* See https://llvm.org/LICENSE.txt for license information.
diff --git a/flang/include/flang/Common/format.h b/FortranRuntime/include/flang/Common/format.h
similarity index 99%
rename from flang/include/flang/Common/format.h
rename to FortranRuntime/include/flang/Common/format.h
index 138e84b72b733d..6f4dfc8d2376b7 100644
--- a/flang/include/flang/Common/format.h
+++ b/FortranRuntime/include/flang/Common/format.h
@@ -901,4 +901,4 @@ template <typename CHAR> bool FormatValidator<CHAR>::Check() {
}
} // namespace Fortran::common
-#endif // FORTRAN_COMMON_FORMAT_H_
+#endif /* FORTRAN_COMMON_FORMAT_H_ */
diff --git a/flang/include/flang/Common/idioms.h b/FortranRuntime/include/flang/Common/idioms.h
similarity index 99%
rename from flang/include/flang/Common/idioms.h
rename to FortranRuntime/include/flang/Common/idioms.h
index 99f383ec75b999..1ae0c0b35112e9 100644
--- a/flang/include/flang/Common/idioms.h
+++ b/FortranRuntime/include/flang/Common/idioms.h
@@ -150,4 +150,4 @@ template <typename A, typename... B>
using IfNoLvalue = std::enable_if_t<(... && !std::is_lvalue_reference_v<B>), A>;
template <typename... RVREF> using NoLvalue = IfNoLvalue<void, RVREF...>;
} // namespace Fortran::common
-#endif // FORTRAN_COMMON_IDIOMS_H_
+#endif /* FORTRAN_COMMON_IDIOMS_H_ */
diff --git a/flang/include/flang/Common/leading-zero-bit-count.h b/FortranRuntime/include/flang/Common/leading-zero-bit-count.h
similarity index 98%
rename from flang/include/flang/Common/leading-zero-bit-count.h
rename to FortranRuntime/include/flang/Common/leading-zero-bit-count.h
index a296e0b446917f..e788bfa9bcfd08 100644
--- a/flang/include/flang/Common/leading-zero-bit-count.h
+++ b/FortranRuntime/include/flang/Common/leading-zero-bit-count.h
@@ -93,4 +93,4 @@ template <typename A> inline constexpr int BitsNeededFor(A x) {
return 8 * sizeof x - LeadingZeroBitCount(x);
}
} // namespace Fortran::common
-#endif // FORTRAN_COMMON_LEADING_ZERO_BIT_COUNT_H_
+#endif /* FORTRAN_COMMON_LEADING_ZERO_BIT_COUNT_H_ */
diff --git a/flang/include/flang/Runtime/magic-numbers.h b/FortranRuntime/include/flang/Common/magic-numbers.h
similarity index 98%
rename from flang/include/flang/Runtime/magic-numbers.h
rename to FortranRuntime/include/flang/Common/magic-numbers.h
index bab0e9ae05299a..931df690766219 100644
--- a/flang/include/flang/Runtime/magic-numbers.h
+++ b/FortranRuntime/include/flang/Common/magic-numbers.h
@@ -1,10 +1,10 @@
-#if 0 /*===-- include/flang/Runtime/magic-numbers.h -----------------------===*/
-/*
+#if 0 /*===-- include/flang/Runtime/magic-numbers.h ---------------*- C -*-===*/
+ *
* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
* See https://llvm.org/LICENSE.txt for license information.
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
*
- *===----------------------------------------------------------------------===*/
+/*===----------------------------------------------------------------------===*/
#endif
#if 0
This header can be included into both Fortran and C.
diff --git a/flang/include/flang/Common/optional.h b/FortranRuntime/include/flang/Common/optional.h
similarity index 98%
rename from flang/include/flang/Common/optional.h
rename to FortranRuntime/include/flang/Common/optional.h
index c0f4278009f40a..c3db3b1329a2fd 100644
--- a/flang/include/flang/Common/optional.h
+++ b/FortranRuntime/include/flang/Common/optional.h
@@ -23,8 +23,8 @@
// * cuda:: namespace need to be forced for all std:: references.
//
//===----------------------------------------------------------------------===//
-#ifndef FORTRAN_COMMON_OPTIONAL_H
-#define FORTRAN_COMMON_OPTIONAL_H
+#ifndef FORTRAN_COMMON_OPTIONAL_H_
+#define FORTRAN_COMMON_OPTIONAL_H_
#include "flang/Common/api-attrs.h"
#include <optional>
@@ -240,4 +240,4 @@ using std::optional;
} // namespace Fortran::common
-#endif // FORTRAN_COMMON_OPTIONAL_H
+#endif /* FORTRAN_COMMON_OPTIONAL_H_ */
diff --git a/flang/include/flang/Common/real.h b/FortranRuntime/include/flang/Common/real.h
similarity index 99%
rename from flang/include/flang/Common/real.h
rename to FortranRuntime/include/flang/Common/real.h
index b527deda0e3b4f..dc9a2404731e70 100644
--- a/flang/include/flang/Common/real.h
+++ b/FortranRuntime/include/flang/Common/real.h
@@ -141,4 +141,4 @@ class RealCharacteristics {
};
} // namespace Fortran::common
-#endif // FORTRAN_COMMON_REAL_H_
+#endif /* FORTRAN_COMMON_REAL_H_ */
diff --git a/flang/include/flang/Common/reference-wrapper.h b/FortranRuntime/include/flang/Common/reference-wrapper.h
similarity index 96%
rename from flang/include/flang/Common/reference-wrapper.h
rename to FortranRuntime/include/flang/Common/reference-wrapper.h
index 2983754108f95a..6822fb335f398c 100644
--- a/flang/include/flang/Common/reference-wrapper.h
+++ b/FortranRuntime/include/flang/Common/reference-wrapper.h
@@ -22,8 +22,8 @@
//
// clang-format on
-#ifndef FORTRAN_COMMON_REFERENCE_WRAPPER_H
-#define FORTRAN_COMMON_REFERENCE_WRAPPER_H
+#ifndef FORTRAN_COMMON_REFERENCE_WRAPPER_H_
+#define FORTRAN_COMMON_REFERENCE_WRAPPER_H_
#include "flang/Common/api-attrs.h"
#include <functional>
@@ -111,4 +111,4 @@ using std::reference_wrapper;
} // namespace Fortran::common
-#endif // FORTRAN_COMMON_REFERENCE_WRAPPER_H
+#endif /* FORTRAN_COMMON_REFERENCE_WRAPPER_H_ */
diff --git a/flang/include/flang/Common/restorer.h b/FortranRuntime/include/flang/Common/restorer.h
similarity index 97%
rename from flang/include/flang/Common/restorer.h
rename to FortranRuntime/include/flang/Common/restorer.h
index 0f1bc48620d37e..a5c5ebe7344a1b 100644
--- a/flang/include/flang/Common/restorer.h
+++ b/FortranRuntime/include/flang/Common/restorer.h
@@ -18,8 +18,8 @@
#ifndef FORTRAN_COMMON_RESTORER_H_
#define FORTRAN_COMMON_RESTORER_H_
-#include "idioms.h"
#include "flang/Common/api-attrs.h"
+#include "idioms.h"
namespace Fortran::common {
template <typename A> class Restorer {
public:
@@ -53,4 +53,4 @@ RT_API_ATTRS common::IfNoLvalue<Restorer<A>, B> ScopedSet(
return Restorer<A>{to, std::move(original)};
}
} // namespace Fortran::common
-#endif // FORTRAN_COMMON_RESTORER_H_
+#endif /* FORTRAN_COMMON_RESTORER_H_ */
diff --git a/flang/include/flang/Common/target-rounding.h b/FortranRuntime/include/flang/Common/target-rounding.h
similarity index 100%
rename from flang/include/flang/Common/target-rounding.h
rename to FortranRuntime/include/flang/Common/target-rounding.h
diff --git a/flang/include/flang/Common/uint128.h b/FortranRuntime/include/flang/Common/uint128.h
similarity index 99%
rename from flang/include/flang/Common/uint128.h
rename to FortranRuntime/include/flang/Common/uint128.h
index 821c8c3b08a52f..1b2ee6a2c14b87 100644
--- a/flang/include/flang/Common/uint128.h
+++ b/FortranRuntime/include/flang/Common/uint128.h
@@ -19,8 +19,8 @@
#define AVOID_NATIVE_UINT128_T 0
#endif
-#include "leading-zero-bit-count.h"
#include "flang/Common/api-attrs.h"
+#include "leading-zero-bit-count.h"
#include <cstdint>
#include <type_traits>
@@ -303,4 +303,4 @@ template <int BITS>
using HostSignedIntType = typename HostSignedIntTypeHelper<BITS>::type;
} // namespace Fortran::common
-#endif
+#endif /* FORTRAN_COMMON_UINT128_H_ */
diff --git a/flang/include/flang/Common/variant.h b/FortranRuntime/include/flang/Common/variant.h
similarity index 89%
rename from flang/include/flang/Common/variant.h
rename to FortranRuntime/include/flang/Common/variant.h
index 1af85876afac00..ff9b1aed4eba91 100644
--- a/flang/include/flang/Common/variant.h
+++ b/FortranRuntime/include/flang/Common/variant.h
@@ -11,8 +11,8 @@
// and the related names become available, though, they may correspond
// to alternative definitions (e.g. from cuda::std namespace).
-#ifndef FORTRAN_COMMON_VARIANT_H
-#define FORTRAN_COMMON_VARIANT_H
+#ifndef FORTRAN_COMMON_VARIANT_H_
+#define FORTRAN_COMMON_VARIANT_H_
#if RT_USE_LIBCUDACXX
#include <cuda/std/variant>
@@ -27,4 +27,4 @@ using cuda::std::visit;
#include <variant>
#endif // !RT_USE_LIBCUDACXX
-#endif // FORTRAN_COMMON_VARIANT_H
+#endif /* FORTRAN_COMMON_VARIANT_H_ */
diff --git a/flang/include/flang/Common/visit.h b/FortranRuntime/include/flang/Common/visit.h
similarity index 98%
rename from flang/include/flang/Common/visit.h
rename to FortranRuntime/include/flang/Common/visit.h
index ad66297650b093..8030ac9be173c3 100644
--- a/flang/include/flang/Common/visit.h
+++ b/FortranRuntime/include/flang/Common/visit.h
@@ -21,8 +21,8 @@
#ifndef FORTRAN_COMMON_VISIT_H_
#define FORTRAN_COMMON_VISIT_H_
-#include "variant.h"
#include "flang/Common/api-attrs.h"
+#include "variant.h"
#include <type_traits>
namespace Fortran::common {
@@ -100,4 +100,4 @@ using Fortran::common::log2visit::visit;
#endif
} // namespace Fortran::common
-#endif // FORTRAN_COMMON_VISIT_H_
+#endif /* FORTRAN_COMMON_VISIT_H_ */
diff --git a/flang/include/flang/Common/windows-include.h b/FortranRuntime/include/flang/Common/windows-include.h
similarity index 93%
rename from flang/includ...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/110298
More information about the llvm-branch-commits
mailing list