[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
Fri Sep 27 09:46:57 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 98c71d8b21084841d068fe77d117b506f1809e69 2216bfe4a07625d894accf5730a313a65d30a982 --extensions cpp,h,c,inc -- flang/include/flang/Evaluate/call.h flang/include/flang/Evaluate/characteristics.h flang/include/flang/Evaluate/common.h flang/include/flang/Evaluate/constant.h flang/include/flang/Evaluate/expression.h flang/include/flang/Evaluate/formatting.h flang/include/flang/Evaluate/intrinsics.h flang/include/flang/Evaluate/shape.h flang/include/flang/Evaluate/target.h flang/include/flang/Evaluate/tools.h flang/include/flang/Evaluate/traverse.h flang/include/flang/Evaluate/type.h flang/include/flang/Evaluate/variable.h flang/include/flang/Frontend/FrontendOptions.h flang/include/flang/Lower/AbstractConverter.h flang/include/flang/Lower/Bridge.h flang/include/flang/Lower/CallInterface.h flang/include/flang/Lower/ConvertType.h flang/include/flang/Lower/LoweringOptions.h flang/include/flang/Lower/PFTBuilder.h flang/include/flang/Lower/Support/Utils.h flang/include/flang/Lower/SymbolMap.h flang/include/flang/Optimizer/Builder/FIRBuilder.h flang/include/flang/Optimizer/Builder/IntrinsicCall.h flang/include/flang/Optimizer/Builder/PPCIntrinsicCall.h flang/include/flang/Optimizer/Builder/Runtime/RTBuilder.h flang/include/flang/Optimizer/CodeGen/DescriptorModel.h flang/include/flang/Optimizer/Dialect/CUF/Attributes/CUFAttr.h flang/include/flang/Optimizer/Support/TypeCode.h flang/include/flang/Optimizer/Support/Utils.h flang/include/flang/Parser/char-block.h flang/include/flang/Parser/dump-parse-tree.h flang/include/flang/Parser/message.h flang/include/flang/Parser/parse-state.h flang/include/flang/Parser/parse-tree.h flang/include/flang/Parser/parsing.h flang/include/flang/Parser/provenance.h flang/include/flang/Parser/source.h flang/include/flang/Parser/user-state.h flang/include/flang/Semantics/expression.h flang/include/flang/Semantics/runtime-type-info.h flang/include/flang/Semantics/scope.h flang/include/flang/Semantics/semantics.h flang/include/flang/Semantics/symbol.h flang/include/flang/Semantics/tools.h flang/include/flang/Semantics/type.h flang/include/flang/Tools/CrossToolHelpers.h flang/lib/Evaluate/call.cpp flang/lib/Evaluate/characteristics.cpp flang/lib/Evaluate/common.cpp flang/lib/Evaluate/fold-implementation.h flang/lib/Evaluate/formatting.cpp flang/lib/Evaluate/intrinsics-library.cpp flang/lib/Evaluate/intrinsics.cpp flang/lib/Evaluate/real.cpp flang/lib/Evaluate/shape.cpp flang/lib/Evaluate/target.cpp flang/lib/Frontend/CompilerInstance.cpp flang/lib/Frontend/CompilerInvocation.cpp flang/lib/Frontend/FrontendActions.cpp flang/lib/Lower/Bridge.cpp flang/lib/Lower/CallInterface.cpp flang/lib/Lower/ConvertExpr.cpp flang/lib/Lower/Mangler.cpp flang/lib/Optimizer/Builder/IntrinsicCall.cpp flang/lib/Optimizer/CodeGen/TypeConverter.cpp flang/lib/Optimizer/Dialect/FIRType.cpp flang/lib/Optimizer/Transforms/AddDebugInfo.cpp flang/lib/Optimizer/Transforms/AssumedRankOpConversion.cpp flang/lib/Optimizer/Transforms/CufOpConversion.cpp flang/lib/Optimizer/Transforms/ExternalNameConversion.cpp flang/lib/Optimizer/Transforms/LoopVersioning.cpp flang/lib/Optimizer/Transforms/SimplifyIntrinsics.cpp flang/lib/Optimizer/Transforms/StackReclaim.cpp flang/lib/Optimizer/Transforms/VScaleAttr.cpp flang/lib/Parser/basic-parsers.h flang/lib/Parser/parse-tree.cpp flang/lib/Parser/prescan.h flang/lib/Parser/unparse.cpp flang/lib/Semantics/assignment.h flang/lib/Semantics/check-case.cpp flang/lib/Semantics/check-coarray.cpp flang/lib/Semantics/check-cuda.cpp flang/lib/Semantics/check-data.h flang/lib/Semantics/check-do-forall.cpp flang/lib/Semantics/check-return.cpp flang/lib/Semantics/check-select-rank.cpp flang/lib/Semantics/check-select-type.cpp flang/lib/Semantics/check-stop.cpp flang/lib/Semantics/data-to-inits.h flang/lib/Semantics/expression.cpp flang/lib/Semantics/pointer-assignment.cpp flang/lib/Semantics/resolve-labels.cpp flang/lib/Semantics/resolve-names-utils.cpp flang/lib/Semantics/resolve-names.cpp flang/lib/Semantics/rewrite-parse-tree.cpp flang/lib/Semantics/semantics.cpp flang/lib/Semantics/tools.cpp flang/tools/bbc/bbc.cpp flang/tools/f18-parse-demo/f18-parse-demo.cpp flang/unittests/Evaluate/bit-population-count.cpp flang/unittests/Evaluate/expression.cpp flang/unittests/Evaluate/folding.cpp flang/unittests/Evaluate/integer.cpp flang/unittests/Evaluate/intrinsics.cpp flang/unittests/Evaluate/leading-zero-bit-count.cpp flang/unittests/Evaluate/logical.cpp flang/unittests/Evaluate/real.cpp flang/unittests/Evaluate/uint128.cpp FortranRuntime/include/flang/Common/Fortran-consts.h FortranRuntime/include/flang/Common/ISO_Fortran_binding.h FortranRuntime/include/flang/Common/ISO_Fortran_binding_wrapper.h FortranRuntime/include/flang/Common/api-attrs.h FortranRuntime/include/flang/Common/binary-floating-point.h FortranRuntime/include/flang/Common/bit-population-count.h FortranRuntime/include/flang/Common/constexpr-bitset.h FortranRuntime/include/flang/Common/decimal.h FortranRuntime/include/flang/Common/enum-class.h FortranRuntime/include/flang/Common/enum-set.h FortranRuntime/include/flang/Common/fast-int-set.h FortranRuntime/include/flang/Common/float128.h FortranRuntime/include/flang/Common/format.h FortranRuntime/include/flang/Common/idioms.h FortranRuntime/include/flang/Common/leading-zero-bit-count.h FortranRuntime/include/flang/Common/optional.h FortranRuntime/include/flang/Common/real.h FortranRuntime/include/flang/Common/reference-wrapper.h FortranRuntime/include/flang/Common/restorer.h FortranRuntime/include/flang/Common/target-rounding.h FortranRuntime/include/flang/Common/uint128.h FortranRuntime/include/flang/Common/variant.h FortranRuntime/include/flang/Common/visit.h FortranRuntime/include/flang/Common/windows-include.h FortranRuntime/include/flang/Runtime/CUDA/allocator.h FortranRuntime/include/flang/Runtime/CUDA/descriptor.h FortranRuntime/include/flang/Runtime/allocatable.h FortranRuntime/include/flang/Runtime/allocator-registry.h FortranRuntime/include/flang/Runtime/array-constructor.h FortranRuntime/include/flang/Runtime/assign.h FortranRuntime/include/flang/Runtime/c-or-cpp.h FortranRuntime/include/flang/Runtime/character.h FortranRuntime/include/flang/Runtime/command.h FortranRuntime/include/flang/Runtime/cpp-type.h FortranRuntime/include/flang/Runtime/derived-api.h FortranRuntime/include/flang/Runtime/descriptor.h FortranRuntime/include/flang/Runtime/entry-names.h FortranRuntime/include/flang/Runtime/exceptions.h FortranRuntime/include/flang/Runtime/execute.h FortranRuntime/include/flang/Runtime/extensions.h FortranRuntime/include/flang/Runtime/freestanding-tools.h FortranRuntime/include/flang/Runtime/inquiry.h FortranRuntime/include/flang/Runtime/io-api.h FortranRuntime/include/flang/Runtime/iostat.h FortranRuntime/include/flang/Runtime/magic-numbers.h FortranRuntime/include/flang/Runtime/main.h FortranRuntime/include/flang/Runtime/matmul-instances.inc FortranRuntime/include/flang/Runtime/matmul-transpose.h FortranRuntime/include/flang/Runtime/matmul.h FortranRuntime/include/flang/Runtime/memory.h FortranRuntime/include/flang/Runtime/misc-intrinsic.h FortranRuntime/include/flang/Runtime/numeric.h FortranRuntime/include/flang/Runtime/pointer.h FortranRuntime/include/flang/Runtime/ragged.h FortranRuntime/include/flang/Runtime/random.h FortranRuntime/include/flang/Runtime/reduce.h FortranRuntime/include/flang/Runtime/reduction.h FortranRuntime/include/flang/Runtime/stop.h FortranRuntime/include/flang/Runtime/support.h FortranRuntime/include/flang/Runtime/temporary-stack.h FortranRuntime/include/flang/Runtime/time-intrinsic.h FortranRuntime/include/flang/Runtime/transformational.h FortranRuntime/include/flang/Runtime/type-code.h FortranRuntime/include/flang/Testing/fp-testing.h FortranRuntime/include/flang/Testing/testing.h FortranRuntime/lib/Common/big-radix-floating-point.h FortranRuntime/lib/Common/binary-to-decimal.cpp FortranRuntime/lib/Common/decimal-to-binary.cpp FortranRuntime/lib/Runtime/CUDA/allocator.cpp FortranRuntime/lib/Runtime/CUDA/descriptor.cpp FortranRuntime/lib/Runtime/Float128Math/acos.cpp FortranRuntime/lib/Runtime/Float128Math/acosh.cpp FortranRuntime/lib/Runtime/Float128Math/asin.cpp FortranRuntime/lib/Runtime/Float128Math/asinh.cpp FortranRuntime/lib/Runtime/Float128Math/atan.cpp FortranRuntime/lib/Runtime/Float128Math/atan2.cpp FortranRuntime/lib/Runtime/Float128Math/atanh.cpp FortranRuntime/lib/Runtime/Float128Math/ceil.cpp FortranRuntime/lib/Runtime/Float128Math/complex-math.c FortranRuntime/lib/Runtime/Float128Math/complex-math.h FortranRuntime/lib/Runtime/Float128Math/cos.cpp FortranRuntime/lib/Runtime/Float128Math/cosh.cpp FortranRuntime/lib/Runtime/Float128Math/erf.cpp FortranRuntime/lib/Runtime/Float128Math/erfc.cpp FortranRuntime/lib/Runtime/Float128Math/exp.cpp FortranRuntime/lib/Runtime/Float128Math/exponent.cpp FortranRuntime/lib/Runtime/Float128Math/floor.cpp FortranRuntime/lib/Runtime/Float128Math/fma.cpp FortranRuntime/lib/Runtime/Float128Math/fraction.cpp FortranRuntime/lib/Runtime/Float128Math/hypot.cpp FortranRuntime/lib/Runtime/Float128Math/j0.cpp FortranRuntime/lib/Runtime/Float128Math/j1.cpp FortranRuntime/lib/Runtime/Float128Math/jn.cpp FortranRuntime/lib/Runtime/Float128Math/lgamma.cpp FortranRuntime/lib/Runtime/Float128Math/llround.cpp FortranRuntime/lib/Runtime/Float128Math/log.cpp FortranRuntime/lib/Runtime/Float128Math/log10.cpp FortranRuntime/lib/Runtime/Float128Math/lround.cpp FortranRuntime/lib/Runtime/Float128Math/math-entries.h FortranRuntime/lib/Runtime/Float128Math/mod-real.cpp FortranRuntime/lib/Runtime/Float128Math/modulo-real.cpp FortranRuntime/lib/Runtime/Float128Math/nearest.cpp FortranRuntime/lib/Runtime/Float128Math/norm2.cpp FortranRuntime/lib/Runtime/Float128Math/numeric-template-specs.h FortranRuntime/lib/Runtime/Float128Math/pow.cpp FortranRuntime/lib/Runtime/Float128Math/random.cpp FortranRuntime/lib/Runtime/Float128Math/round.cpp FortranRuntime/lib/Runtime/Float128Math/rrspacing.cpp FortranRuntime/lib/Runtime/Float128Math/scale.cpp FortranRuntime/lib/Runtime/Float128Math/set-exponent.cpp FortranRuntime/lib/Runtime/Float128Math/sin.cpp FortranRuntime/lib/Runtime/Float128Math/sinh.cpp FortranRuntime/lib/Runtime/Float128Math/spacing.cpp FortranRuntime/lib/Runtime/Float128Math/sqrt.cpp FortranRuntime/lib/Runtime/Float128Math/tan.cpp FortranRuntime/lib/Runtime/Float128Math/tanh.cpp FortranRuntime/lib/Runtime/Float128Math/tgamma.cpp FortranRuntime/lib/Runtime/Float128Math/trunc.cpp FortranRuntime/lib/Runtime/Float128Math/y0.cpp FortranRuntime/lib/Runtime/Float128Math/y1.cpp FortranRuntime/lib/Runtime/Float128Math/yn.cpp FortranRuntime/lib/Runtime/ISO_Fortran_binding.cpp FortranRuntime/lib/Runtime/ISO_Fortran_util.h FortranRuntime/lib/Runtime/allocatable.cpp FortranRuntime/lib/Runtime/allocator-registry.cpp FortranRuntime/lib/Runtime/array-constructor.cpp FortranRuntime/lib/Runtime/assign-impl.h FortranRuntime/lib/Runtime/assign.cpp FortranRuntime/lib/Runtime/buffer.cpp FortranRuntime/lib/Runtime/buffer.h FortranRuntime/lib/Runtime/character.cpp FortranRuntime/lib/Runtime/command.cpp FortranRuntime/lib/Runtime/complex-powi.cpp FortranRuntime/lib/Runtime/complex-reduction.c FortranRuntime/lib/Runtime/complex-reduction.h FortranRuntime/lib/Runtime/connection.cpp FortranRuntime/lib/Runtime/connection.h FortranRuntime/lib/Runtime/copy.cpp FortranRuntime/lib/Runtime/copy.h FortranRuntime/lib/Runtime/derived-api.cpp FortranRuntime/lib/Runtime/derived.cpp FortranRuntime/lib/Runtime/derived.h FortranRuntime/lib/Runtime/descriptor-io.cpp FortranRuntime/lib/Runtime/descriptor-io.h FortranRuntime/lib/Runtime/descriptor.cpp FortranRuntime/lib/Runtime/dot-product.cpp FortranRuntime/lib/Runtime/edit-input.cpp FortranRuntime/lib/Runtime/edit-input.h FortranRuntime/lib/Runtime/edit-output.cpp FortranRuntime/lib/Runtime/edit-output.h FortranRuntime/lib/Runtime/emit-encoded.h FortranRuntime/lib/Runtime/environment-default-list.h FortranRuntime/lib/Runtime/environment.cpp FortranRuntime/lib/Runtime/environment.h FortranRuntime/lib/Runtime/exceptions.cpp FortranRuntime/lib/Runtime/execute.cpp FortranRuntime/lib/Runtime/extensions.cpp FortranRuntime/lib/Runtime/external-unit.cpp FortranRuntime/lib/Runtime/extrema.cpp FortranRuntime/lib/Runtime/file.cpp FortranRuntime/lib/Runtime/file.h FortranRuntime/lib/Runtime/findloc.cpp FortranRuntime/lib/Runtime/format-implementation.h FortranRuntime/lib/Runtime/format.cpp FortranRuntime/lib/Runtime/format.h FortranRuntime/lib/Runtime/inquiry.cpp FortranRuntime/lib/Runtime/internal-unit.cpp FortranRuntime/lib/Runtime/internal-unit.h FortranRuntime/lib/Runtime/io-api-common.h FortranRuntime/lib/Runtime/io-api-minimal.cpp FortranRuntime/lib/Runtime/io-api.cpp FortranRuntime/lib/Runtime/io-error.cpp FortranRuntime/lib/Runtime/io-error.h FortranRuntime/lib/Runtime/io-stmt.cpp FortranRuntime/lib/Runtime/io-stmt.h FortranRuntime/lib/Runtime/iostat.cpp FortranRuntime/lib/Runtime/lock.h FortranRuntime/lib/Runtime/main.cpp FortranRuntime/lib/Runtime/matmul-transpose.cpp FortranRuntime/lib/Runtime/matmul.cpp FortranRuntime/lib/Runtime/memory.cpp FortranRuntime/lib/Runtime/misc-intrinsic.cpp FortranRuntime/lib/Runtime/namelist.cpp FortranRuntime/lib/Runtime/namelist.h FortranRuntime/lib/Runtime/non-tbp-dio.cpp FortranRuntime/lib/Runtime/non-tbp-dio.h FortranRuntime/lib/Runtime/numeric-templates.h FortranRuntime/lib/Runtime/numeric.cpp FortranRuntime/lib/Runtime/pointer.cpp FortranRuntime/lib/Runtime/product.cpp FortranRuntime/lib/Runtime/pseudo-unit.cpp FortranRuntime/lib/Runtime/ragged.cpp FortranRuntime/lib/Runtime/random-templates.h FortranRuntime/lib/Runtime/random.cpp FortranRuntime/lib/Runtime/reduce.cpp FortranRuntime/lib/Runtime/reduction-templates.h FortranRuntime/lib/Runtime/reduction.cpp FortranRuntime/lib/Runtime/stack.h FortranRuntime/lib/Runtime/stat.cpp FortranRuntime/lib/Runtime/stat.h FortranRuntime/lib/Runtime/stop.cpp FortranRuntime/lib/Runtime/sum.cpp FortranRuntime/lib/Runtime/support.cpp FortranRuntime/lib/Runtime/temporary-stack.cpp FortranRuntime/lib/Runtime/terminator.cpp FortranRuntime/lib/Runtime/terminator.h FortranRuntime/lib/Runtime/time-intrinsic.cpp FortranRuntime/lib/Runtime/tools.cpp FortranRuntime/lib/Runtime/tools.h FortranRuntime/lib/Runtime/transformational.cpp FortranRuntime/lib/Runtime/type-code.cpp FortranRuntime/lib/Runtime/type-info.cpp FortranRuntime/lib/Runtime/type-info.h FortranRuntime/lib/Runtime/unit-map.cpp FortranRuntime/lib/Runtime/unit-map.h FortranRuntime/lib/Runtime/unit.cpp FortranRuntime/lib/Runtime/unit.h FortranRuntime/lib/Runtime/utf.cpp FortranRuntime/lib/Runtime/utf.h FortranRuntime/lib/Testing/fp-testing.cpp FortranRuntime/lib/Testing/testing.cpp FortranRuntime/unittests/Common/FastIntSetTest.cpp FortranRuntime/unittests/Decimal/quick-sanity-test.cpp FortranRuntime/unittests/Decimal/thorough-test.cpp FortranRuntime/unittests/Evaluate/ISO-Fortran-binding.cpp FortranRuntime/unittests/Evaluate/reshape.cpp FortranRuntime/unittests/Runtime/AccessTest.cpp FortranRuntime/unittests/Runtime/Allocatable.cpp FortranRuntime/unittests/Runtime/ArrayConstructor.cpp FortranRuntime/unittests/Runtime/BufferTest.cpp FortranRuntime/unittests/Runtime/CUDA/AllocatorCUF.cpp FortranRuntime/unittests/Runtime/CharacterTest.cpp FortranRuntime/unittests/Runtime/CommandTest.cpp FortranRuntime/unittests/Runtime/Complex.cpp FortranRuntime/unittests/Runtime/CrashHandlerFixture.cpp FortranRuntime/unittests/Runtime/CrashHandlerFixture.h FortranRuntime/unittests/Runtime/Derived.cpp FortranRuntime/unittests/Runtime/ExternalIOTest.cpp FortranRuntime/unittests/Runtime/Format.cpp FortranRuntime/unittests/Runtime/Inquiry.cpp FortranRuntime/unittests/Runtime/ListInputTest.cpp FortranRuntime/unittests/Runtime/LogicalFormatTest.cpp FortranRuntime/unittests/Runtime/Matmul.cpp FortranRuntime/unittests/Runtime/MatmulTranspose.cpp FortranRuntime/unittests/Runtime/MiscIntrinsic.cpp FortranRuntime/unittests/Runtime/Namelist.cpp FortranRuntime/unittests/Runtime/Numeric.cpp FortranRuntime/unittests/Runtime/NumericalFormatTest.cpp FortranRuntime/unittests/Runtime/Pointer.cpp FortranRuntime/unittests/Runtime/Ragged.cpp FortranRuntime/unittests/Runtime/Random.cpp FortranRuntime/unittests/Runtime/Reduction.cpp FortranRuntime/unittests/Runtime/RuntimeCrashTest.cpp FortranRuntime/unittests/Runtime/Stop.cpp FortranRuntime/unittests/Runtime/Support.cpp FortranRuntime/unittests/Runtime/TemporaryStack.cpp FortranRuntime/unittests/Runtime/Time.cpp FortranRuntime/unittests/Runtime/Transformational.cpp FortranRuntime/unittests/Runtime/tools.h flang/include/flang/Support/Fortran-features.h flang/include/flang/Support/Fortran.h flang/include/flang/Support/MathOptionsBase.h flang/include/flang/Support/OpenMP-features.h flang/include/flang/Support/Version.h flang/include/flang/Support/default-kinds.h flang/include/flang/Support/indirection.h flang/include/flang/Support/interval.h flang/include/flang/Support/reference-counted.h flang/include/flang/Support/reference.h flang/include/flang/Support/static-multimap-view.h flang/include/flang/Support/template.h flang/include/flang/Support/unwrap.h flang/lib/Support/Fortran-features.cpp flang/lib/Support/Fortran.cpp flang/lib/Support/Version.cpp flang/lib/Support/default-kinds.cpp flang/lib/Support/idioms.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/FortranRuntime/include/flang/Common/restorer.h b/FortranRuntime/include/flang/Common/restorer.h
index a5c5ebe734..d45aea5f52 100644
--- a/FortranRuntime/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 "flang/Common/api-attrs.h"
#include "idioms.h"
+#include "flang/Common/api-attrs.h"
namespace Fortran::common {
template <typename A> class Restorer {
public:
diff --git a/FortranRuntime/include/flang/Common/uint128.h b/FortranRuntime/include/flang/Common/uint128.h
index 1b2ee6a2c1..c942282b8d 100644
--- a/FortranRuntime/include/flang/Common/uint128.h
+++ b/FortranRuntime/include/flang/Common/uint128.h
@@ -19,8 +19,8 @@
#define AVOID_NATIVE_UINT128_T 0
#endif
-#include "flang/Common/api-attrs.h"
#include "leading-zero-bit-count.h"
+#include "flang/Common/api-attrs.h"
#include <cstdint>
#include <type_traits>
diff --git a/FortranRuntime/include/flang/Common/visit.h b/FortranRuntime/include/flang/Common/visit.h
index 8030ac9be1..84547f9abd 100644
--- a/FortranRuntime/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 "flang/Common/api-attrs.h"
#include "variant.h"
+#include "flang/Common/api-attrs.h"
#include <type_traits>
namespace Fortran::common {
diff --git a/FortranRuntime/include/flang/Runtime/magic-numbers.h b/FortranRuntime/include/flang/Runtime/magic-numbers.h
index 931df69076..1fadc78fdf 100644
--- a/FortranRuntime/include/flang/Runtime/magic-numbers.h
+++ b/FortranRuntime/include/flang/Runtime/magic-numbers.h
@@ -1,4 +1,5 @@
-#if 0 /*===-- include/flang/Runtime/magic-numbers.h ---------------*- C -*-===*/
+#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.
diff --git a/FortranRuntime/lib/Runtime/Float128Math/math-entries.h b/FortranRuntime/lib/Runtime/Float128Math/math-entries.h
index cb1e013060..1449000820 100644
--- a/FortranRuntime/lib/Runtime/Float128Math/math-entries.h
+++ b/FortranRuntime/lib/Runtime/Float128Math/math-entries.h
@@ -8,10 +8,10 @@
#ifndef FORTRAN_RUNTIME_FLOAT128MATH_MATH_ENTRIES_H_
#define FORTRAN_RUNTIME_FLOAT128MATH_MATH_ENTRIES_H_
-#include "flang/Common/float128.h"
-#include "flang/Runtime/entry-names.h"
#include "terminator.h"
#include "tools.h"
+#include "flang/Common/float128.h"
+#include "flang/Runtime/entry-names.h"
#include <cfloat>
#include <cmath>
#include <type_traits>
diff --git a/FortranRuntime/lib/Runtime/ISO_Fortran_binding.cpp b/FortranRuntime/lib/Runtime/ISO_Fortran_binding.cpp
index 9711b2bcf4..d2fab4bbc3 100644
--- a/FortranRuntime/lib/Runtime/ISO_Fortran_binding.cpp
+++ b/FortranRuntime/lib/Runtime/ISO_Fortran_binding.cpp
@@ -10,11 +10,11 @@
// as specified in section 18.5.5 of Fortran 2018.
#include "ISO_Fortran_util.h"
+#include "terminator.h"
#include "flang/Common/ISO_Fortran_binding_wrapper.h"
#include "flang/Runtime/descriptor.h"
#include "flang/Runtime/pointer.h"
#include "flang/Runtime/type-code.h"
-#include "terminator.h"
#include <cstdlib>
namespace Fortran::ISO {
diff --git a/FortranRuntime/lib/Runtime/ISO_Fortran_util.h b/FortranRuntime/lib/Runtime/ISO_Fortran_util.h
index 7ab2807330..8167874603 100644
--- a/FortranRuntime/lib/Runtime/ISO_Fortran_util.h
+++ b/FortranRuntime/lib/Runtime/ISO_Fortran_util.h
@@ -11,10 +11,10 @@
// Internal utils for establishing CFI_cdesc_t descriptors.
+#include "terminator.h"
#include "flang/Common/ISO_Fortran_binding_wrapper.h"
#include "flang/Runtime/descriptor.h"
#include "flang/Runtime/type-code.h"
-#include "terminator.h"
#include <cstdlib>
namespace Fortran::ISO {
diff --git a/FortranRuntime/lib/Runtime/allocatable.cpp b/FortranRuntime/lib/Runtime/allocatable.cpp
index 8b6c1a4c14..e3b43a5f81 100644
--- a/FortranRuntime/lib/Runtime/allocatable.cpp
+++ b/FortranRuntime/lib/Runtime/allocatable.cpp
@@ -9,12 +9,12 @@
#include "flang/Runtime/allocatable.h"
#include "assign-impl.h"
#include "derived.h"
-#include "flang/Common/ISO_Fortran_binding_wrapper.h"
-#include "flang/Runtime/assign.h"
-#include "flang/Runtime/descriptor.h"
#include "stat.h"
#include "terminator.h"
#include "type-info.h"
+#include "flang/Common/ISO_Fortran_binding_wrapper.h"
+#include "flang/Runtime/assign.h"
+#include "flang/Runtime/descriptor.h"
namespace Fortran::runtime {
extern "C" {
diff --git a/FortranRuntime/lib/Runtime/array-constructor.cpp b/FortranRuntime/lib/Runtime/array-constructor.cpp
index db57d4fc4c..287d054887 100644
--- a/FortranRuntime/lib/Runtime/array-constructor.cpp
+++ b/FortranRuntime/lib/Runtime/array-constructor.cpp
@@ -8,12 +8,12 @@
#include "flang/Runtime/array-constructor.h"
#include "derived.h"
-#include "flang/Runtime/allocatable.h"
-#include "flang/Runtime/assign.h"
-#include "flang/Runtime/descriptor.h"
#include "terminator.h"
#include "tools.h"
#include "type-info.h"
+#include "flang/Runtime/allocatable.h"
+#include "flang/Runtime/assign.h"
+#include "flang/Runtime/descriptor.h"
namespace Fortran::runtime {
diff --git a/FortranRuntime/lib/Runtime/assign.cpp b/FortranRuntime/lib/Runtime/assign.cpp
index cc38e55e3a..7c5eb135d4 100644
--- a/FortranRuntime/lib/Runtime/assign.cpp
+++ b/FortranRuntime/lib/Runtime/assign.cpp
@@ -9,11 +9,11 @@
#include "flang/Runtime/assign.h"
#include "assign-impl.h"
#include "derived.h"
-#include "flang/Runtime/descriptor.h"
#include "stat.h"
#include "terminator.h"
#include "tools.h"
#include "type-info.h"
+#include "flang/Runtime/descriptor.h"
namespace Fortran::runtime {
diff --git a/FortranRuntime/lib/Runtime/buffer.h b/FortranRuntime/lib/Runtime/buffer.h
index dd3c19fa14..0c5b6f560a 100644
--- a/FortranRuntime/lib/Runtime/buffer.h
+++ b/FortranRuntime/lib/Runtime/buffer.h
@@ -11,9 +11,9 @@
#ifndef FORTRAN_RUNTIME_BUFFER_H_
#define FORTRAN_RUNTIME_BUFFER_H_
+#include "io-error.h"
#include "flang/Runtime/freestanding-tools.h"
#include "flang/Runtime/memory.h"
-#include "io-error.h"
#include <algorithm>
#include <cinttypes>
#include <cstring>
diff --git a/FortranRuntime/lib/Runtime/character.cpp b/FortranRuntime/lib/Runtime/character.cpp
index 32fc010c6c..73d3d93c50 100644
--- a/FortranRuntime/lib/Runtime/character.cpp
+++ b/FortranRuntime/lib/Runtime/character.cpp
@@ -7,13 +7,13 @@
//===----------------------------------------------------------------------===//
#include "flang/Runtime/character.h"
+#include "terminator.h"
+#include "tools.h"
#include "flang/Common/bit-population-count.h"
#include "flang/Common/uint128.h"
#include "flang/Runtime/character.h"
#include "flang/Runtime/cpp-type.h"
#include "flang/Runtime/descriptor.h"
-#include "terminator.h"
-#include "tools.h"
#include <algorithm>
#include <cstring>
diff --git a/FortranRuntime/lib/Runtime/command.cpp b/FortranRuntime/lib/Runtime/command.cpp
index dc57758d4f..50a084714e 100644
--- a/FortranRuntime/lib/Runtime/command.cpp
+++ b/FortranRuntime/lib/Runtime/command.cpp
@@ -8,10 +8,10 @@
#include "flang/Runtime/command.h"
#include "environment.h"
-#include "flang/Runtime/descriptor.h"
#include "stat.h"
#include "terminator.h"
#include "tools.h"
+#include "flang/Runtime/descriptor.h"
#include <cstdlib>
#include <limits>
diff --git a/FortranRuntime/lib/Runtime/connection.h b/FortranRuntime/lib/Runtime/connection.h
index 92a3a9c386..e078bfb9f0 100644
--- a/FortranRuntime/lib/Runtime/connection.h
+++ b/FortranRuntime/lib/Runtime/connection.h
@@ -11,8 +11,8 @@
#ifndef FORTRAN_RUNTIME_CONNECTION_H_
#define FORTRAN_RUNTIME_CONNECTION_H_
-#include "flang/Common/optional.h"
#include "format.h"
+#include "flang/Common/optional.h"
#include <cinttypes>
namespace Fortran::runtime::io {
diff --git a/FortranRuntime/lib/Runtime/copy.cpp b/FortranRuntime/lib/Runtime/copy.cpp
index 39c7da4517..72a86e3b80 100644
--- a/FortranRuntime/lib/Runtime/copy.cpp
+++ b/FortranRuntime/lib/Runtime/copy.cpp
@@ -7,11 +7,11 @@
//===----------------------------------------------------------------------===//
#include "copy.h"
-#include "flang/Runtime/allocatable.h"
-#include "flang/Runtime/descriptor.h"
#include "stack.h"
#include "terminator.h"
#include "type-info.h"
+#include "flang/Runtime/allocatable.h"
+#include "flang/Runtime/descriptor.h"
#include <cstring>
namespace Fortran::runtime {
diff --git a/FortranRuntime/lib/Runtime/derived-api.cpp b/FortranRuntime/lib/Runtime/derived-api.cpp
index 4b68cdbbed..0bcdd45ddb 100644
--- a/FortranRuntime/lib/Runtime/derived-api.cpp
+++ b/FortranRuntime/lib/Runtime/derived-api.cpp
@@ -8,10 +8,10 @@
#include "flang/Runtime/derived-api.h"
#include "derived.h"
-#include "flang/Runtime/descriptor.h"
#include "terminator.h"
#include "tools.h"
#include "type-info.h"
+#include "flang/Runtime/descriptor.h"
namespace Fortran::runtime {
diff --git a/FortranRuntime/lib/Runtime/derived.cpp b/FortranRuntime/lib/Runtime/derived.cpp
index 52bf54d62c..04d765211d 100644
--- a/FortranRuntime/lib/Runtime/derived.cpp
+++ b/FortranRuntime/lib/Runtime/derived.cpp
@@ -7,11 +7,11 @@
//===----------------------------------------------------------------------===//
#include "derived.h"
-#include "flang/Runtime/descriptor.h"
#include "stat.h"
#include "terminator.h"
#include "tools.h"
#include "type-info.h"
+#include "flang/Runtime/descriptor.h"
namespace Fortran::runtime {
diff --git a/FortranRuntime/lib/Runtime/descriptor-io.h b/FortranRuntime/lib/Runtime/descriptor-io.h
index 2ccad0cea7..5c5d278a4d 100644
--- a/FortranRuntime/lib/Runtime/descriptor-io.h
+++ b/FortranRuntime/lib/Runtime/descriptor-io.h
@@ -16,15 +16,15 @@
#include "edit-input.h"
#include "edit-output.h"
-#include "flang/Common/optional.h"
-#include "flang/Common/uint128.h"
-#include "flang/Runtime/cpp-type.h"
-#include "flang/Runtime/descriptor.h"
#include "io-stmt.h"
#include "namelist.h"
#include "terminator.h"
#include "type-info.h"
#include "unit.h"
+#include "flang/Common/optional.h"
+#include "flang/Common/uint128.h"
+#include "flang/Runtime/cpp-type.h"
+#include "flang/Runtime/descriptor.h"
namespace Fortran::runtime::io::descr {
template <typename A>
diff --git a/FortranRuntime/lib/Runtime/descriptor.cpp b/FortranRuntime/lib/Runtime/descriptor.cpp
index 6756134b06..f064fe3dcc 100644
--- a/FortranRuntime/lib/Runtime/descriptor.cpp
+++ b/FortranRuntime/lib/Runtime/descriptor.cpp
@@ -9,12 +9,12 @@
#include "flang/Runtime/descriptor.h"
#include "ISO_Fortran_util.h"
#include "derived.h"
-#include "flang/Runtime/allocator-registry.h"
#include "memory.h"
#include "stat.h"
#include "terminator.h"
#include "tools.h"
#include "type-info.h"
+#include "flang/Runtime/allocator-registry.h"
#include <cassert>
#include <cstdlib>
#include <cstring>
diff --git a/FortranRuntime/lib/Runtime/dot-product.cpp b/FortranRuntime/lib/Runtime/dot-product.cpp
index ab1cfa58ef..9eb22790e3 100644
--- a/FortranRuntime/lib/Runtime/dot-product.cpp
+++ b/FortranRuntime/lib/Runtime/dot-product.cpp
@@ -6,13 +6,13 @@
//
//===----------------------------------------------------------------------===//
+#include "float.h"
+#include "terminator.h"
+#include "tools.h"
#include "flang/Common/float128.h"
#include "flang/Runtime/cpp-type.h"
#include "flang/Runtime/descriptor.h"
#include "flang/Runtime/reduction.h"
-#include "float.h"
-#include "terminator.h"
-#include "tools.h"
#include <cfloat>
#include <cinttypes>
diff --git a/FortranRuntime/lib/Runtime/edit-input.cpp b/FortranRuntime/lib/Runtime/edit-input.cpp
index eaa9d0d7e6..6ebb0e7aca 100644
--- a/FortranRuntime/lib/Runtime/edit-input.cpp
+++ b/FortranRuntime/lib/Runtime/edit-input.cpp
@@ -7,12 +7,12 @@
//===----------------------------------------------------------------------===//
#include "edit-input.h"
+#include "namelist.h"
+#include "utf.h"
#include "flang/Common/optional.h"
#include "flang/Common/real.h"
#include "flang/Common/uint128.h"
#include "flang/Runtime/freestanding-tools.h"
-#include "namelist.h"
-#include "utf.h"
#include <algorithm>
#include <cfenv>
diff --git a/FortranRuntime/lib/Runtime/edit-input.h b/FortranRuntime/lib/Runtime/edit-input.h
index 2eda81a6d4..f88f6daa47 100644
--- a/FortranRuntime/lib/Runtime/edit-input.h
+++ b/FortranRuntime/lib/Runtime/edit-input.h
@@ -9,9 +9,9 @@
#ifndef FORTRAN_RUNTIME_EDIT_INPUT_H_
#define FORTRAN_RUNTIME_EDIT_INPUT_H_
-#include "flang/Common/decimal.h"
#include "format.h"
#include "io-stmt.h"
+#include "flang/Common/decimal.h"
namespace Fortran::runtime::io {
diff --git a/FortranRuntime/lib/Runtime/edit-output.cpp b/FortranRuntime/lib/Runtime/edit-output.cpp
index 1fab7db6d3..ccaf8085f0 100644
--- a/FortranRuntime/lib/Runtime/edit-output.cpp
+++ b/FortranRuntime/lib/Runtime/edit-output.cpp
@@ -8,9 +8,9 @@
#include "edit-output.h"
#include "emit-encoded.h"
+#include "utf.h"
#include "flang/Common/real.h"
#include "flang/Common/uint128.h"
-#include "utf.h"
#include <algorithm>
namespace Fortran::runtime::io {
diff --git a/FortranRuntime/lib/Runtime/edit-output.h b/FortranRuntime/lib/Runtime/edit-output.h
index cb25b68a35..7e6c6cdedd 100644
--- a/FortranRuntime/lib/Runtime/edit-output.h
+++ b/FortranRuntime/lib/Runtime/edit-output.h
@@ -18,10 +18,10 @@
// Drives the same fast binary-to-decimal formatting templates used
// in the f18 front-end.
-#include "flang/Common/decimal.h"
-#include "flang/Common/uint128.h"
#include "format.h"
#include "io-stmt.h"
+#include "flang/Common/decimal.h"
+#include "flang/Common/uint128.h"
namespace Fortran::runtime::io {
diff --git a/FortranRuntime/lib/Runtime/environment.h b/FortranRuntime/lib/Runtime/environment.h
index 7d10b3a2b9..5d0823bb0e 100644
--- a/FortranRuntime/lib/Runtime/environment.h
+++ b/FortranRuntime/lib/Runtime/environment.h
@@ -39,7 +39,7 @@ struct ExecutionEnvironment {
// FIXME: https://github.com/llvm/llvm-project/issues/84942
constexpr
#endif
- ExecutionEnvironment(){};
+ ExecutionEnvironment() {};
void Configure(int argc, const char *argv[], const char *envp[],
const EnvironmentDefaultList *envDefaults);
const char *GetEnv(
diff --git a/FortranRuntime/lib/Runtime/execute.cpp b/FortranRuntime/lib/Runtime/execute.cpp
index 54f28d0528..77aac16424 100644
--- a/FortranRuntime/lib/Runtime/execute.cpp
+++ b/FortranRuntime/lib/Runtime/execute.cpp
@@ -8,10 +8,10 @@
#include "flang/Runtime/execute.h"
#include "environment.h"
-#include "flang/Runtime/descriptor.h"
#include "stat.h"
#include "terminator.h"
#include "tools.h"
+#include "flang/Runtime/descriptor.h"
#include <cstdlib>
#include <errno.h>
#include <future>
diff --git a/FortranRuntime/lib/Runtime/extensions.cpp b/FortranRuntime/lib/Runtime/extensions.cpp
index 94bfa3059e..808a0e702a 100644
--- a/FortranRuntime/lib/Runtime/extensions.cpp
+++ b/FortranRuntime/lib/Runtime/extensions.cpp
@@ -10,12 +10,12 @@
// extensions that will eventually be implemented in Fortran.
#include "flang/Runtime/extensions.h"
+#include "terminator.h"
+#include "tools.h"
#include "flang/Runtime/command.h"
#include "flang/Runtime/descriptor.h"
#include "flang/Runtime/entry-names.h"
#include "flang/Runtime/io-api.h"
-#include "terminator.h"
-#include "tools.h"
#include <chrono>
#include <cstring>
#include <ctime>
@@ -51,7 +51,7 @@ inline void CtimeBuffer(char *buffer, size_t bufsize, const time_t cur_time,
#ifndef _WIN32
// posix-compliant and has getlogin_r and F_OK
-#include <unistd.h>
+#include <unistd.h>
#endif
extern "C" {
diff --git a/FortranRuntime/lib/Runtime/extrema.cpp b/FortranRuntime/lib/Runtime/extrema.cpp
index 0809cb1d5f..be9da63d7b 100644
--- a/FortranRuntime/lib/Runtime/extrema.cpp
+++ b/FortranRuntime/lib/Runtime/extrema.cpp
@@ -10,10 +10,10 @@
// and shapes and (for MAXLOC & MINLOC) result integer kinds. Also implements
// NORM2 using common infrastructure.
+#include "reduction-templates.h"
#include "flang/Common/float128.h"
#include "flang/Runtime/character.h"
#include "flang/Runtime/reduction.h"
-#include "reduction-templates.h"
#include <algorithm>
#include <cfloat>
#include <cinttypes>
diff --git a/FortranRuntime/lib/Runtime/file.cpp b/FortranRuntime/lib/Runtime/file.cpp
index b82f1c63e3..44e3850cdf 100644
--- a/FortranRuntime/lib/Runtime/file.cpp
+++ b/FortranRuntime/lib/Runtime/file.cpp
@@ -7,9 +7,9 @@
//===----------------------------------------------------------------------===//
#include "file.h"
+#include "tools.h"
#include "flang/Runtime/magic-numbers.h"
#include "flang/Runtime/memory.h"
-#include "tools.h"
#include <algorithm>
#include <cerrno>
#include <cstring>
diff --git a/FortranRuntime/lib/Runtime/file.h b/FortranRuntime/lib/Runtime/file.h
index 66d6275663..1a30268a2a 100644
--- a/FortranRuntime/lib/Runtime/file.h
+++ b/FortranRuntime/lib/Runtime/file.h
@@ -11,9 +11,9 @@
#ifndef FORTRAN_RUNTIME_FILE_H_
#define FORTRAN_RUNTIME_FILE_H_
+#include "io-error.h"
#include "flang/Common/optional.h"
#include "flang/Runtime/memory.h"
-#include "io-error.h"
#include <cinttypes>
namespace Fortran::runtime::io {
diff --git a/FortranRuntime/lib/Runtime/findloc.cpp b/FortranRuntime/lib/Runtime/findloc.cpp
index 47c51fbcef..da5fe0c0a0 100644
--- a/FortranRuntime/lib/Runtime/findloc.cpp
+++ b/FortranRuntime/lib/Runtime/findloc.cpp
@@ -9,9 +9,9 @@
// Implements FINDLOC for all required operand types and shapes and result
// integer kinds.
+#include "reduction-templates.h"
#include "flang/Runtime/character.h"
#include "flang/Runtime/reduction.h"
-#include "reduction-templates.h"
#include <cinttypes>
#include <complex>
diff --git a/FortranRuntime/lib/Runtime/format-implementation.h b/FortranRuntime/lib/Runtime/format-implementation.h
index 8d0d0f3376..f17f0a2cb4 100644
--- a/FortranRuntime/lib/Runtime/format-implementation.h
+++ b/FortranRuntime/lib/Runtime/format-implementation.h
@@ -12,12 +12,12 @@
#define FORTRAN_RUNTIME_FORMAT_IMPLEMENTATION_H_
#include "emit-encoded.h"
-#include "flang/Common/decimal.h"
-#include "flang/Common/format.h"
-#include "flang/Runtime/main.h"
#include "format.h"
#include "io-stmt.h"
#include "memory.h"
+#include "flang/Common/decimal.h"
+#include "flang/Common/format.h"
+#include "flang/Runtime/main.h"
#include <algorithm>
#include <cstring>
#include <limits>
diff --git a/FortranRuntime/lib/Runtime/format.h b/FortranRuntime/lib/Runtime/format.h
index 3e0807ee45..098a251a04 100644
--- a/FortranRuntime/lib/Runtime/format.h
+++ b/FortranRuntime/lib/Runtime/format.h
@@ -12,11 +12,11 @@
#define FORTRAN_RUNTIME_FORMAT_H_
#include "environment.h"
+#include "io-error.h"
#include "flang/Common/Fortran-consts.h"
#include "flang/Common/decimal.h"
#include "flang/Common/optional.h"
#include "flang/Runtime/freestanding-tools.h"
-#include "io-error.h"
#include <cinttypes>
namespace Fortran::runtime {
diff --git a/FortranRuntime/lib/Runtime/inquiry.cpp b/FortranRuntime/lib/Runtime/inquiry.cpp
index 172b46037d..9a5ef0cea2 100644
--- a/FortranRuntime/lib/Runtime/inquiry.cpp
+++ b/FortranRuntime/lib/Runtime/inquiry.cpp
@@ -11,9 +11,9 @@
#include "flang/Runtime/inquiry.h"
#include "copy.h"
-#include "flang/Runtime/descriptor.h"
#include "terminator.h"
#include "tools.h"
+#include "flang/Runtime/descriptor.h"
#include <algorithm>
namespace Fortran::runtime {
diff --git a/FortranRuntime/lib/Runtime/internal-unit.cpp b/FortranRuntime/lib/Runtime/internal-unit.cpp
index 81b937ba63..95d371a49a 100644
--- a/FortranRuntime/lib/Runtime/internal-unit.cpp
+++ b/FortranRuntime/lib/Runtime/internal-unit.cpp
@@ -7,9 +7,9 @@
//===----------------------------------------------------------------------===//
#include "internal-unit.h"
+#include "io-error.h"
#include "flang/Runtime/descriptor.h"
#include "flang/Runtime/freestanding-tools.h"
-#include "io-error.h"
#include <algorithm>
#include <type_traits>
diff --git a/FortranRuntime/lib/Runtime/io-api-common.h b/FortranRuntime/lib/Runtime/io-api-common.h
index 4276667235..39fe5cee72 100644
--- a/FortranRuntime/lib/Runtime/io-api-common.h
+++ b/FortranRuntime/lib/Runtime/io-api-common.h
@@ -9,12 +9,12 @@
#ifndef FORTRAN_RUNTIME_IO_API_COMMON_H_
#define FORTRAN_RUNTIME_IO_API_COMMON_H_
-#include "flang/Common/api-attrs.h"
-#include "flang/Common/optional.h"
-#include "flang/Runtime/io-api.h"
#include "io-stmt.h"
#include "terminator.h"
#include "unit.h"
+#include "flang/Common/api-attrs.h"
+#include "flang/Common/optional.h"
+#include "flang/Runtime/io-api.h"
namespace Fortran::runtime::io {
diff --git a/FortranRuntime/lib/Runtime/io-api-minimal.cpp b/FortranRuntime/lib/Runtime/io-api-minimal.cpp
index 683694bd63..6bc262cae7 100644
--- a/FortranRuntime/lib/Runtime/io-api-minimal.cpp
+++ b/FortranRuntime/lib/Runtime/io-api-minimal.cpp
@@ -10,13 +10,13 @@
// list-directed output (PRINT *) of intrinsic types.
#include "edit-output.h"
-#include "flang/Runtime/io-api.h"
#include "format.h"
#include "io-api-common.h"
#include "io-stmt.h"
#include "terminator.h"
#include "tools.h"
#include "unit.h"
+#include "flang/Runtime/io-api.h"
namespace Fortran::runtime::io {
RT_EXT_API_GROUP_BEGIN
diff --git a/FortranRuntime/lib/Runtime/io-api.cpp b/FortranRuntime/lib/Runtime/io-api.cpp
index 102ea26b35..f4a396d4c4 100644
--- a/FortranRuntime/lib/Runtime/io-api.cpp
+++ b/FortranRuntime/lib/Runtime/io-api.cpp
@@ -18,15 +18,15 @@
#include "edit-input.h"
#include "edit-output.h"
#include "environment.h"
-#include "flang/Common/optional.h"
-#include "flang/Runtime/descriptor.h"
-#include "flang/Runtime/memory.h"
#include "format.h"
#include "io-api-common.h"
#include "io-stmt.h"
#include "terminator.h"
#include "tools.h"
#include "unit.h"
+#include "flang/Common/optional.h"
+#include "flang/Runtime/descriptor.h"
+#include "flang/Runtime/memory.h"
#include <cstdlib>
#include <memory>
diff --git a/FortranRuntime/lib/Runtime/io-error.cpp b/FortranRuntime/lib/Runtime/io-error.cpp
index b14a30354d..0536674620 100644
--- a/FortranRuntime/lib/Runtime/io-error.cpp
+++ b/FortranRuntime/lib/Runtime/io-error.cpp
@@ -8,8 +8,8 @@
#include "io-error.h"
#include "config.h"
-#include "flang/Runtime/magic-numbers.h"
#include "tools.h"
+#include "flang/Runtime/magic-numbers.h"
#include <cerrno>
#include <cstdarg>
#include <cstdio>
diff --git a/FortranRuntime/lib/Runtime/io-error.h b/FortranRuntime/lib/Runtime/io-error.h
index 7388a2134e..bed58a7ea6 100644
--- a/FortranRuntime/lib/Runtime/io-error.h
+++ b/FortranRuntime/lib/Runtime/io-error.h
@@ -15,9 +15,9 @@
#ifndef FORTRAN_RUNTIME_IO_ERROR_H_
#define FORTRAN_RUNTIME_IO_ERROR_H_
+#include "terminator.h"
#include "flang/Runtime/iostat.h"
#include "flang/Runtime/memory.h"
-#include "terminator.h"
#include <cinttypes>
namespace Fortran::runtime::io {
diff --git a/FortranRuntime/lib/Runtime/io-stmt.cpp b/FortranRuntime/lib/Runtime/io-stmt.cpp
index 5be5d98ace..484027ab42 100644
--- a/FortranRuntime/lib/Runtime/io-stmt.cpp
+++ b/FortranRuntime/lib/Runtime/io-stmt.cpp
@@ -9,11 +9,11 @@
#include "io-stmt.h"
#include "connection.h"
#include "emit-encoded.h"
-#include "flang/Runtime/memory.h"
#include "format.h"
#include "tools.h"
#include "unit.h"
#include "utf.h"
+#include "flang/Runtime/memory.h"
#include <algorithm>
#include <cstdio>
#include <cstring>
@@ -363,8 +363,8 @@ int NoUnitIoStatementState::EndIoStatement() {
template <Direction DIR>
ExternalIoStatementState<DIR>::ExternalIoStatementState(
ExternalFileUnit &unit, const char *sourceFile, int sourceLine)
- : ExternalIoStatementBase{unit, sourceFile, sourceLine}, mutableModes_{
- unit.modes} {
+ : ExternalIoStatementBase{unit, sourceFile, sourceLine},
+ mutableModes_{unit.modes} {
if constexpr (DIR == Direction::Output) {
// If the last statement was a non-advancing IO input statement, the unit
// furthestPositionInRecord was not advanced, but the positionInRecord may
@@ -983,9 +983,8 @@ ChildFormattedIoStatementState<DIR, CHAR>::ChildFormattedIoStatementState(
ChildIo &child, const CHAR *format, std::size_t formatLength,
const Descriptor *formatDescriptor, const char *sourceFile, int sourceLine)
: ChildIoStatementState<DIR>{child, sourceFile, sourceLine},
- mutableModes_{child.parent().mutableModes()}, format_{*this, format,
- formatLength,
- formatDescriptor} {}
+ mutableModes_{child.parent().mutableModes()},
+ format_{*this, format, formatLength, formatDescriptor} {}
template <Direction DIR, typename CHAR>
void ChildFormattedIoStatementState<DIR, CHAR>::CompleteOperation() {
@@ -1441,8 +1440,8 @@ bool InquireNoUnitState::Inquire(
InquireUnconnectedFileState::InquireUnconnectedFileState(
OwningPtr<char> &&path, const char *sourceFile, int sourceLine)
- : NoUnitIoStatementState{*this, sourceFile, sourceLine}, path_{std::move(
- path)} {}
+ : NoUnitIoStatementState{*this, sourceFile, sourceLine},
+ path_{std::move(path)} {}
bool InquireUnconnectedFileState::Inquire(
InquiryKeywordHash inquiry, char *result, std::size_t length) {
diff --git a/FortranRuntime/lib/Runtime/io-stmt.h b/FortranRuntime/lib/Runtime/io-stmt.h
index 79a8b28c8a..18efca6339 100644
--- a/FortranRuntime/lib/Runtime/io-stmt.h
+++ b/FortranRuntime/lib/Runtime/io-stmt.h
@@ -13,14 +13,14 @@
#include "connection.h"
#include "file.h"
+#include "format.h"
+#include "internal-unit.h"
+#include "io-error.h"
#include "flang/Common/optional.h"
#include "flang/Common/reference-wrapper.h"
#include "flang/Common/visit.h"
#include "flang/Runtime/descriptor.h"
#include "flang/Runtime/io-api.h"
-#include "format.h"
-#include "internal-unit.h"
-#include "io-error.h"
#include <flang/Common/variant.h>
#include <functional>
#include <type_traits>
diff --git a/FortranRuntime/lib/Runtime/matmul-transpose.cpp b/FortranRuntime/lib/Runtime/matmul-transpose.cpp
index 3b4b487daa..d493333dfa 100644
--- a/FortranRuntime/lib/Runtime/matmul-transpose.cpp
+++ b/FortranRuntime/lib/Runtime/matmul-transpose.cpp
@@ -21,12 +21,12 @@
// to use the faster BLAS routines.
#include "flang/Runtime/matmul-transpose.h"
+#include "terminator.h"
+#include "tools.h"
#include "flang/Common/optional.h"
#include "flang/Runtime/c-or-cpp.h"
#include "flang/Runtime/cpp-type.h"
#include "flang/Runtime/descriptor.h"
-#include "terminator.h"
-#include "tools.h"
#include <cstring>
namespace {
diff --git a/FortranRuntime/lib/Runtime/matmul.cpp b/FortranRuntime/lib/Runtime/matmul.cpp
index 62674316bc..124369e728 100644
--- a/FortranRuntime/lib/Runtime/matmul.cpp
+++ b/FortranRuntime/lib/Runtime/matmul.cpp
@@ -20,12 +20,12 @@
// Places where BLAS routines could be called are marked as TODO items.
#include "flang/Runtime/matmul.h"
+#include "terminator.h"
+#include "tools.h"
#include "flang/Common/optional.h"
#include "flang/Runtime/c-or-cpp.h"
#include "flang/Runtime/cpp-type.h"
#include "flang/Runtime/descriptor.h"
-#include "terminator.h"
-#include "tools.h"
#include <cstring>
namespace {
diff --git a/FortranRuntime/lib/Runtime/memory.cpp b/FortranRuntime/lib/Runtime/memory.cpp
index bf2c4cd4a3..4a811107ca 100644
--- a/FortranRuntime/lib/Runtime/memory.cpp
+++ b/FortranRuntime/lib/Runtime/memory.cpp
@@ -7,9 +7,9 @@
//===----------------------------------------------------------------------===//
#include "flang/Runtime/memory.h"
-#include "flang/Runtime/freestanding-tools.h"
#include "terminator.h"
#include "tools.h"
+#include "flang/Runtime/freestanding-tools.h"
#include <cstdlib>
namespace Fortran::runtime {
diff --git a/FortranRuntime/lib/Runtime/misc-intrinsic.cpp b/FortranRuntime/lib/Runtime/misc-intrinsic.cpp
index a0f41e4e3f..b942d762e7 100644
--- a/FortranRuntime/lib/Runtime/misc-intrinsic.cpp
+++ b/FortranRuntime/lib/Runtime/misc-intrinsic.cpp
@@ -7,10 +7,10 @@
//===----------------------------------------------------------------------===//
#include "flang/Runtime/misc-intrinsic.h"
-#include "flang/Common/optional.h"
-#include "flang/Runtime/descriptor.h"
#include "terminator.h"
#include "tools.h"
+#include "flang/Common/optional.h"
+#include "flang/Runtime/descriptor.h"
#include <algorithm>
#include <cstdio>
#include <cstring>
diff --git a/FortranRuntime/lib/Runtime/namelist.cpp b/FortranRuntime/lib/Runtime/namelist.cpp
index 1c8942fc37..e6229d5657 100644
--- a/FortranRuntime/lib/Runtime/namelist.cpp
+++ b/FortranRuntime/lib/Runtime/namelist.cpp
@@ -9,8 +9,8 @@
#include "namelist.h"
#include "descriptor-io.h"
#include "emit-encoded.h"
-#include "flang/Runtime/io-api.h"
#include "io-stmt.h"
+#include "flang/Runtime/io-api.h"
#include <algorithm>
#include <cstring>
#include <limits>
diff --git a/FortranRuntime/lib/Runtime/namelist.h b/FortranRuntime/lib/Runtime/namelist.h
index 2c4d331ae0..04432f8a08 100644
--- a/FortranRuntime/lib/Runtime/namelist.h
+++ b/FortranRuntime/lib/Runtime/namelist.h
@@ -11,8 +11,8 @@
#ifndef FORTRAN_RUNTIME_NAMELIST_H_
#define FORTRAN_RUNTIME_NAMELIST_H_
-#include "flang/Common/api-attrs.h"
#include "non-tbp-dio.h"
+#include "flang/Common/api-attrs.h"
#include <cstddef>
diff --git a/FortranRuntime/lib/Runtime/numeric-templates.h b/FortranRuntime/lib/Runtime/numeric-templates.h
index f0045e8ee3..159b8b0b95 100644
--- a/FortranRuntime/lib/Runtime/numeric-templates.h
+++ b/FortranRuntime/lib/Runtime/numeric-templates.h
@@ -18,10 +18,10 @@
#ifndef FORTRAN_RUNTIME_NUMERIC_TEMPLATES_H_
#define FORTRAN_RUNTIME_NUMERIC_TEMPLATES_H_
-#include "flang/Common/api-attrs.h"
-#include "flang/Common/float128.h"
#include "terminator.h"
#include "tools.h"
+#include "flang/Common/api-attrs.h"
+#include "flang/Common/float128.h"
#include <cstdint>
#include <limits>
diff --git a/FortranRuntime/lib/Runtime/numeric.cpp b/FortranRuntime/lib/Runtime/numeric.cpp
index a3fcfeaa9e..b0f68a7fc8 100644
--- a/FortranRuntime/lib/Runtime/numeric.cpp
+++ b/FortranRuntime/lib/Runtime/numeric.cpp
@@ -7,10 +7,10 @@
//===----------------------------------------------------------------------===//
#include "flang/Runtime/numeric.h"
-#include "flang/Common/float128.h"
#include "numeric-templates.h"
#include "terminator.h"
#include "tools.h"
+#include "flang/Common/float128.h"
#include <cfloat>
#include <climits>
#include <cmath>
diff --git a/FortranRuntime/lib/Runtime/product.cpp b/FortranRuntime/lib/Runtime/product.cpp
index 8c11bf4144..e4a6e81bd0 100644
--- a/FortranRuntime/lib/Runtime/product.cpp
+++ b/FortranRuntime/lib/Runtime/product.cpp
@@ -8,9 +8,9 @@
// Implements PRODUCT for all required operand types and shapes.
+#include "reduction-templates.h"
#include "flang/Common/float128.h"
#include "flang/Runtime/reduction.h"
-#include "reduction-templates.h"
#include <cfloat>
#include <cinttypes>
#include <complex>
diff --git a/FortranRuntime/lib/Runtime/random-templates.h b/FortranRuntime/lib/Runtime/random-templates.h
index 801484225b..6042b5e4ec 100644
--- a/FortranRuntime/lib/Runtime/random-templates.h
+++ b/FortranRuntime/lib/Runtime/random-templates.h
@@ -9,10 +9,10 @@
#ifndef FORTRAN_RUNTIME_RANDOM_TEMPLATES_H_
#define FORTRAN_RUNTIME_RANDOM_TEMPLATES_H_
-#include "flang/Common/optional.h"
-#include "flang/Runtime/descriptor.h"
#include "lock.h"
#include "numeric-templates.h"
+#include "flang/Common/optional.h"
+#include "flang/Runtime/descriptor.h"
#include <algorithm>
#include <random>
diff --git a/FortranRuntime/lib/Runtime/random.cpp b/FortranRuntime/lib/Runtime/random.cpp
index 8e1561960d..343b0a389f 100644
--- a/FortranRuntime/lib/Runtime/random.cpp
+++ b/FortranRuntime/lib/Runtime/random.cpp
@@ -10,14 +10,14 @@
// RANDOM_SEED.
#include "flang/Runtime/random.h"
+#include "lock.h"
+#include "random-templates.h"
+#include "terminator.h"
#include "flang/Common/float128.h"
#include "flang/Common/leading-zero-bit-count.h"
#include "flang/Common/uint128.h"
#include "flang/Runtime/cpp-type.h"
#include "flang/Runtime/descriptor.h"
-#include "lock.h"
-#include "random-templates.h"
-#include "terminator.h"
#include <cmath>
#include <cstdint>
#include <limits>
diff --git a/FortranRuntime/lib/Runtime/reduce.cpp b/FortranRuntime/lib/Runtime/reduce.cpp
index 4d33c2a714..c3e7ef7436 100644
--- a/FortranRuntime/lib/Runtime/reduce.cpp
+++ b/FortranRuntime/lib/Runtime/reduce.cpp
@@ -9,10 +9,10 @@
// REDUCE() implementation
#include "flang/Runtime/reduce.h"
-#include "flang/Runtime/descriptor.h"
#include "reduction-templates.h"
#include "terminator.h"
#include "tools.h"
+#include "flang/Runtime/descriptor.h"
namespace Fortran::runtime {
diff --git a/FortranRuntime/lib/Runtime/reduction-templates.h b/FortranRuntime/lib/Runtime/reduction-templates.h
index 30ae641ba7..94652b20a6 100644
--- a/FortranRuntime/lib/Runtime/reduction-templates.h
+++ b/FortranRuntime/lib/Runtime/reduction-templates.h
@@ -21,11 +21,11 @@
#ifndef FORTRAN_RUNTIME_REDUCTION_TEMPLATES_H_
#define FORTRAN_RUNTIME_REDUCTION_TEMPLATES_H_
-#include "flang/Runtime/cpp-type.h"
-#include "flang/Runtime/descriptor.h"
#include "numeric-templates.h"
#include "terminator.h"
#include "tools.h"
+#include "flang/Runtime/cpp-type.h"
+#include "flang/Runtime/descriptor.h"
#include <algorithm>
namespace Fortran::runtime {
@@ -318,13 +318,13 @@ RT_VAR_GROUP_BEGIN
// Use at least double precision for accumulators.
// Don't use __float128, it doesn't work with abs() or sqrt() yet.
-static constexpr RT_CONST_VAR_ATTRS int Norm2LargestLDKind {
+static constexpr RT_CONST_VAR_ATTRS int Norm2LargestLDKind{
#if LDBL_MANT_DIG == 113 || HAS_FLOAT128
- 16
+ 16
#elif LDBL_MANT_DIG == 64
- 10
+ 10
#else
- 8
+ 8
#endif
};
diff --git a/FortranRuntime/lib/Runtime/reduction.cpp b/FortranRuntime/lib/Runtime/reduction.cpp
index f4e1f2aa68..0de7dd07b1 100644
--- a/FortranRuntime/lib/Runtime/reduction.cpp
+++ b/FortranRuntime/lib/Runtime/reduction.cpp
@@ -14,8 +14,8 @@
// NORM2, MAXLOC, MINLOC, MAXVAL, and MINVAL are in extrema.cpp.
#include "flang/Runtime/reduction.h"
-#include "flang/Runtime/descriptor.h"
#include "reduction-templates.h"
+#include "flang/Runtime/descriptor.h"
#include <cinttypes>
namespace Fortran::runtime {
diff --git a/FortranRuntime/lib/Runtime/stack.h b/FortranRuntime/lib/Runtime/stack.h
index dc5b6101d3..10a3de51d7 100644
--- a/FortranRuntime/lib/Runtime/stack.h
+++ b/FortranRuntime/lib/Runtime/stack.h
@@ -13,8 +13,8 @@
#ifndef FORTRAN_RUNTIME_STACK_H_
#define FORTRAN_RUNTIME_STACK_H_
-#include "flang/Runtime/memory.h"
#include "terminator.h"
+#include "flang/Runtime/memory.h"
namespace Fortran::runtime {
// Storage for the Stack elements of type T.
diff --git a/FortranRuntime/lib/Runtime/stat.cpp b/FortranRuntime/lib/Runtime/stat.cpp
index 01ae922e08..d483f75998 100644
--- a/FortranRuntime/lib/Runtime/stat.cpp
+++ b/FortranRuntime/lib/Runtime/stat.cpp
@@ -7,9 +7,9 @@
//===----------------------------------------------------------------------===//
#include "stat.h"
-#include "flang/Runtime/descriptor.h"
#include "terminator.h"
#include "tools.h"
+#include "flang/Runtime/descriptor.h"
namespace Fortran::runtime {
RT_OFFLOAD_API_GROUP_BEGIN
diff --git a/FortranRuntime/lib/Runtime/sum.cpp b/FortranRuntime/lib/Runtime/sum.cpp
index e33b77e20f..64982b9fd5 100644
--- a/FortranRuntime/lib/Runtime/sum.cpp
+++ b/FortranRuntime/lib/Runtime/sum.cpp
@@ -12,9 +12,9 @@
// cancellation on intermediate results by using "Kahan summation"
// (basically the same as manual "double-double").
+#include "reduction-templates.h"
#include "flang/Common/float128.h"
#include "flang/Runtime/reduction.h"
-#include "reduction-templates.h"
#include <cfloat>
#include <cinttypes>
#include <complex>
diff --git a/FortranRuntime/lib/Runtime/support.cpp b/FortranRuntime/lib/Runtime/support.cpp
index 0a39ff24b0..1dffa99191 100644
--- a/FortranRuntime/lib/Runtime/support.cpp
+++ b/FortranRuntime/lib/Runtime/support.cpp
@@ -8,8 +8,8 @@
#include "flang/Runtime/support.h"
#include "ISO_Fortran_util.h"
-#include "flang/Runtime/descriptor.h"
#include "type-info.h"
+#include "flang/Runtime/descriptor.h"
namespace Fortran::runtime {
extern "C" {
diff --git a/FortranRuntime/lib/Runtime/temporary-stack.cpp b/FortranRuntime/lib/Runtime/temporary-stack.cpp
index f944dfb7aa..12fa18586b 100644
--- a/FortranRuntime/lib/Runtime/temporary-stack.cpp
+++ b/FortranRuntime/lib/Runtime/temporary-stack.cpp
@@ -10,11 +10,11 @@
// temporaries. For use in HLFIR lowering.
#include "flang/Runtime/temporary-stack.h"
+#include "terminator.h"
#include "flang/Common/ISO_Fortran_binding_wrapper.h"
#include "flang/Runtime/assign.h"
#include "flang/Runtime/descriptor.h"
#include "flang/Runtime/memory.h"
-#include "terminator.h"
namespace {
diff --git a/FortranRuntime/lib/Runtime/time-intrinsic.cpp b/FortranRuntime/lib/Runtime/time-intrinsic.cpp
index 4b362c90c5..05f7e4f80f 100644
--- a/FortranRuntime/lib/Runtime/time-intrinsic.cpp
+++ b/FortranRuntime/lib/Runtime/time-intrinsic.cpp
@@ -9,10 +9,10 @@
// Implements time-related intrinsic subroutines.
#include "flang/Runtime/time-intrinsic.h"
-#include "flang/Runtime/cpp-type.h"
-#include "flang/Runtime/descriptor.h"
#include "terminator.h"
#include "tools.h"
+#include "flang/Runtime/cpp-type.h"
+#include "flang/Runtime/descriptor.h"
#include <algorithm>
#include <cstdint>
#include <cstdio>
diff --git a/FortranRuntime/lib/Runtime/tools.h b/FortranRuntime/lib/Runtime/tools.h
index 4058767ca2..8cdb006b9c 100644
--- a/FortranRuntime/lib/Runtime/tools.h
+++ b/FortranRuntime/lib/Runtime/tools.h
@@ -9,13 +9,13 @@
#ifndef FORTRAN_RUNTIME_TOOLS_H_
#define FORTRAN_RUNTIME_TOOLS_H_
+#include "stat.h"
+#include "terminator.h"
#include "flang/Common/optional.h"
#include "flang/Runtime/cpp-type.h"
#include "flang/Runtime/descriptor.h"
#include "flang/Runtime/freestanding-tools.h"
#include "flang/Runtime/memory.h"
-#include "stat.h"
-#include "terminator.h"
#include <cstring>
#include <functional>
#include <map>
diff --git a/FortranRuntime/lib/Runtime/transformational.cpp b/FortranRuntime/lib/Runtime/transformational.cpp
index 66dc5bd493..8c244fc296 100644
--- a/FortranRuntime/lib/Runtime/transformational.cpp
+++ b/FortranRuntime/lib/Runtime/transformational.cpp
@@ -18,10 +18,10 @@
#include "flang/Runtime/transformational.h"
#include "copy.h"
-#include "flang/Common/float128.h"
-#include "flang/Runtime/descriptor.h"
#include "terminator.h"
#include "tools.h"
+#include "flang/Common/float128.h"
+#include "flang/Runtime/descriptor.h"
namespace Fortran::runtime {
diff --git a/FortranRuntime/lib/Runtime/type-info.h b/FortranRuntime/lib/Runtime/type-info.h
index ff3523bcb2..c022d4a67c 100644
--- a/FortranRuntime/lib/Runtime/type-info.h
+++ b/FortranRuntime/lib/Runtime/type-info.h
@@ -12,11 +12,11 @@
// A C++ perspective of the derived type description schemata in
// flang/module/__fortran_type_info.f90.
+#include "terminator.h"
#include "flang/Common/Fortran-consts.h"
#include "flang/Common/bit-population-count.h"
#include "flang/Common/optional.h"
#include "flang/Runtime/descriptor.h"
-#include "terminator.h"
#include <cinttypes>
#include <memory>
diff --git a/FortranRuntime/lib/Runtime/unit-map.h b/FortranRuntime/lib/Runtime/unit-map.h
index 4e61246f9a..dce9a3cc44 100644
--- a/FortranRuntime/lib/Runtime/unit-map.h
+++ b/FortranRuntime/lib/Runtime/unit-map.h
@@ -12,10 +12,10 @@
#ifndef FORTRAN_RUNTIME_UNIT_MAP_H_
#define FORTRAN_RUNTIME_UNIT_MAP_H_
-#include "flang/Common/fast-int-set.h"
-#include "flang/Runtime/memory.h"
#include "lock.h"
#include "unit.h"
+#include "flang/Common/fast-int-set.h"
+#include "flang/Runtime/memory.h"
#include <cstdint>
#include <cstdlib>
diff --git a/FortranRuntime/lib/Runtime/unit.h b/FortranRuntime/lib/Runtime/unit.h
index 993fbf2977..746b107bf7 100644
--- a/FortranRuntime/lib/Runtime/unit.h
+++ b/FortranRuntime/lib/Runtime/unit.h
@@ -15,14 +15,14 @@
#include "connection.h"
#include "environment.h"
#include "file.h"
-#include "flang/Common/constexpr-bitset.h"
-#include "flang/Common/optional.h"
-#include "flang/Runtime/memory.h"
#include "format.h"
#include "io-error.h"
#include "io-stmt.h"
#include "lock.h"
#include "terminator.h"
+#include "flang/Common/constexpr-bitset.h"
+#include "flang/Common/optional.h"
+#include "flang/Runtime/memory.h"
#include <cstdlib>
#include <cstring>
#include <flang/Common/variant.h>
diff --git a/FortranRuntime/lib/Testing/fp-testing.cpp b/FortranRuntime/lib/Testing/fp-testing.cpp
index 3301d2d8ef..e3283593e5 100644
--- a/FortranRuntime/lib/Testing/fp-testing.cpp
+++ b/FortranRuntime/lib/Testing/fp-testing.cpp
@@ -7,8 +7,8 @@
#include <xmmintrin.h>
#endif
-using Fortran::common::RoundingMode;
using Fortran::common::RealFlag;
+using Fortran::common::RoundingMode;
ScopedHostFloatingPointEnvironment::ScopedHostFloatingPointEnvironment(
#if __x86_64__
diff --git a/FortranRuntime/unittests/Common/FastIntSetTest.cpp b/FortranRuntime/unittests/Common/FastIntSetTest.cpp
index a36a334e37..f19359f409 100644
--- a/FortranRuntime/unittests/Common/FastIntSetTest.cpp
+++ b/FortranRuntime/unittests/Common/FastIntSetTest.cpp
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#include "flang/Common/fast-int-set.h"
#include "gtest/gtest.h"
+#include "flang/Common/fast-int-set.h"
#include <optional>
TEST(FastIntSetTests, Sanity) {
diff --git a/FortranRuntime/unittests/Runtime/AccessTest.cpp b/FortranRuntime/unittests/Runtime/AccessTest.cpp
index 3e9feaf945..e72386cc9a 100644
--- a/FortranRuntime/unittests/Runtime/AccessTest.cpp
+++ b/FortranRuntime/unittests/Runtime/AccessTest.cpp
@@ -10,9 +10,9 @@
#ifndef _WIN32
#include "CrashHandlerFixture.h"
+#include "gtest/gtest.h"
#include "flang/Runtime/extensions.h"
#include "llvm/ADT/Twine.h"
-#include "gtest/gtest.h"
#include <fcntl.h>
#include <sys/stat.h>
diff --git a/FortranRuntime/unittests/Runtime/Allocatable.cpp b/FortranRuntime/unittests/Runtime/Allocatable.cpp
index c01f85598d..8e10dc408c 100644
--- a/FortranRuntime/unittests/Runtime/Allocatable.cpp
+++ b/FortranRuntime/unittests/Runtime/Allocatable.cpp
@@ -7,8 +7,8 @@
//===----------------------------------------------------------------------===//
#include "flang/Runtime/allocatable.h"
-#include "tools.h"
#include "gtest/gtest.h"
+#include "tools.h"
using namespace Fortran::runtime;
diff --git a/FortranRuntime/unittests/Runtime/ArrayConstructor.cpp b/FortranRuntime/unittests/Runtime/ArrayConstructor.cpp
index 9011da304b..8c7fce3e4f 100644
--- a/FortranRuntime/unittests/Runtime/ArrayConstructor.cpp
+++ b/FortranRuntime/unittests/Runtime/ArrayConstructor.cpp
@@ -6,13 +6,13 @@
//
//===----------------------------------------------------------------------===//
+#include "gtest/gtest.h"
+#include "tools.h"
#include "flang/Runtime/allocatable.h"
#include "flang/Runtime/array-constructor.h"
#include "flang/Runtime/cpp-type.h"
#include "flang/Runtime/descriptor.h"
#include "flang/Runtime/type-code.h"
-#include "tools.h"
-#include "gtest/gtest.h"
#include <memory>
diff --git a/FortranRuntime/unittests/Runtime/CUDA/AllocatorCUF.cpp b/FortranRuntime/unittests/Runtime/CUDA/AllocatorCUF.cpp
index d2c1600af8..d078bc78a2 100644
--- a/FortranRuntime/unittests/Runtime/CUDA/AllocatorCUF.cpp
+++ b/FortranRuntime/unittests/Runtime/CUDA/AllocatorCUF.cpp
@@ -6,13 +6,13 @@
//
//===----------------------------------------------------------------------===//
+#include "gtest/gtest.h"
#include "../../../runtime/terminator.h"
#include "flang/Runtime/CUDA/allocator.h"
#include "flang/Runtime/CUDA/descriptor.h"
#include "flang/Runtime/allocatable.h"
#include "flang/Runtime/allocator-registry.h"
#include "flang/Support/Fortran.h"
-#include "gtest/gtest.h"
#include "cuda_runtime.h"
diff --git a/FortranRuntime/unittests/Runtime/CharacterTest.cpp b/FortranRuntime/unittests/Runtime/CharacterTest.cpp
index 8829f5e432..710c1ca0ee 100644
--- a/FortranRuntime/unittests/Runtime/CharacterTest.cpp
+++ b/FortranRuntime/unittests/Runtime/CharacterTest.cpp
@@ -10,8 +10,8 @@
// in Fortran.
#include "flang/Runtime/character.h"
-#include "flang/Runtime/descriptor.h"
#include "gtest/gtest.h"
+#include "flang/Runtime/descriptor.h"
#include <cstring>
#include <functional>
#include <tuple>
diff --git a/FortranRuntime/unittests/Runtime/CommandTest.cpp b/FortranRuntime/unittests/Runtime/CommandTest.cpp
index aa79ce381b..03a31ceab8 100644
--- a/FortranRuntime/unittests/Runtime/CommandTest.cpp
+++ b/FortranRuntime/unittests/Runtime/CommandTest.cpp
@@ -7,12 +7,12 @@
//===----------------------------------------------------------------------===//
#include "flang/Runtime/command.h"
+#include "gmock/gmock.h"
+#include "gtest/gtest.h"
#include "flang/Runtime/descriptor.h"
#include "flang/Runtime/execute.h"
#include "flang/Runtime/extensions.h"
#include "flang/Runtime/main.h"
-#include "gmock/gmock.h"
-#include "gtest/gtest.h"
#include <cstddef>
#include <cstdlib>
diff --git a/FortranRuntime/unittests/Runtime/Derived.cpp b/FortranRuntime/unittests/Runtime/Derived.cpp
index 11b732fe10..8d5471e3e0 100644
--- a/FortranRuntime/unittests/Runtime/Derived.cpp
+++ b/FortranRuntime/unittests/Runtime/Derived.cpp
@@ -6,10 +6,10 @@
//
//===----------------------------------------------------------------------===//
+#include "gtest/gtest.h"
+#include "tools.h"
#include "flang/Runtime/derived-api.h"
#include "flang/Runtime/descriptor.h"
-#include "tools.h"
-#include "gtest/gtest.h"
using namespace Fortran::runtime;
diff --git a/FortranRuntime/unittests/Runtime/ExternalIOTest.cpp b/FortranRuntime/unittests/Runtime/ExternalIOTest.cpp
index 00c2fd76ce..23c1e9992c 100644
--- a/FortranRuntime/unittests/Runtime/ExternalIOTest.cpp
+++ b/FortranRuntime/unittests/Runtime/ExternalIOTest.cpp
@@ -11,12 +11,12 @@
//===----------------------------------------------------------------------===//
#include "CrashHandlerFixture.h"
+#include "gtest/gtest.h"
#include "flang/Runtime/descriptor.h"
#include "flang/Runtime/io-api.h"
#include "flang/Runtime/main.h"
#include "flang/Runtime/stop.h"
#include "llvm/Support/raw_ostream.h"
-#include "gtest/gtest.h"
#include <cstring>
#include <string_view>
diff --git a/FortranRuntime/unittests/Runtime/Inquiry.cpp b/FortranRuntime/unittests/Runtime/Inquiry.cpp
index 204a97a108..39303b7c80 100644
--- a/FortranRuntime/unittests/Runtime/Inquiry.cpp
+++ b/FortranRuntime/unittests/Runtime/Inquiry.cpp
@@ -7,9 +7,9 @@
//===----------------------------------------------------------------------===//
#include "flang/Runtime/inquiry.h"
-#include "flang/Runtime/type-code.h"
-#include "tools.h"
#include "gtest/gtest.h"
+#include "tools.h"
+#include "flang/Runtime/type-code.h"
using namespace Fortran::runtime;
using Fortran::common::TypeCategory;
diff --git a/FortranRuntime/unittests/Runtime/ListInputTest.cpp b/FortranRuntime/unittests/Runtime/ListInputTest.cpp
index 4c30d6ed75..472838c258 100644
--- a/FortranRuntime/unittests/Runtime/ListInputTest.cpp
+++ b/FortranRuntime/unittests/Runtime/ListInputTest.cpp
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#include "../../lib/Runtime/io-error.h"
#include "CrashHandlerFixture.h"
+#include "../../lib/Runtime/io-error.h"
#include "flang/Runtime/descriptor.h"
#include "flang/Runtime/io-api.h"
diff --git a/FortranRuntime/unittests/Runtime/Matmul.cpp b/FortranRuntime/unittests/Runtime/Matmul.cpp
index cfa5d18cc3..a37b618d3a 100644
--- a/FortranRuntime/unittests/Runtime/Matmul.cpp
+++ b/FortranRuntime/unittests/Runtime/Matmul.cpp
@@ -7,12 +7,12 @@
//===----------------------------------------------------------------------===//
#include "flang/Runtime/matmul.h"
+#include "gtest/gtest.h"
+#include "tools.h"
#include "flang/Runtime/allocatable.h"
#include "flang/Runtime/cpp-type.h"
#include "flang/Runtime/descriptor.h"
#include "flang/Runtime/type-code.h"
-#include "tools.h"
-#include "gtest/gtest.h"
using namespace Fortran::runtime;
using Fortran::common::TypeCategory;
diff --git a/FortranRuntime/unittests/Runtime/MatmulTranspose.cpp b/FortranRuntime/unittests/Runtime/MatmulTranspose.cpp
index 146c2283fb..3483d1896e 100644
--- a/FortranRuntime/unittests/Runtime/MatmulTranspose.cpp
+++ b/FortranRuntime/unittests/Runtime/MatmulTranspose.cpp
@@ -6,13 +6,13 @@
//
//===----------------------------------------------------------------------===//
+#include "gtest/gtest.h"
+#include "tools.h"
#include "flang/Runtime/allocatable.h"
#include "flang/Runtime/cpp-type.h"
#include "flang/Runtime/descriptor.h"
#include "flang/Runtime/matmul-transpose.h"
#include "flang/Runtime/type-code.h"
-#include "tools.h"
-#include "gtest/gtest.h"
using namespace Fortran::runtime;
using Fortran::common::TypeCategory;
diff --git a/FortranRuntime/unittests/Runtime/MiscIntrinsic.cpp b/FortranRuntime/unittests/Runtime/MiscIntrinsic.cpp
index 08229b5e48..5672440c0e 100644
--- a/FortranRuntime/unittests/Runtime/MiscIntrinsic.cpp
+++ b/FortranRuntime/unittests/Runtime/MiscIntrinsic.cpp
@@ -6,12 +6,12 @@
//
//===----------------------------------------------------------------------===//
+#include "gtest/gtest.h"
+#include "tools.h"
#include "flang/Runtime//misc-intrinsic.h"
#include "flang/Runtime/allocatable.h"
#include "flang/Runtime/cpp-type.h"
#include "flang/Runtime/descriptor.h"
-#include "tools.h"
-#include "gtest/gtest.h"
using namespace Fortran::runtime;
diff --git a/FortranRuntime/unittests/Runtime/Namelist.cpp b/FortranRuntime/unittests/Runtime/Namelist.cpp
index 7b834dec49..729f9ffa5c 100644
--- a/FortranRuntime/unittests/Runtime/Namelist.cpp
+++ b/FortranRuntime/unittests/Runtime/Namelist.cpp
@@ -8,9 +8,9 @@
#include "../../lib/Runtime/namelist.h"
#include "CrashHandlerFixture.h"
+#include "tools.h"
#include "flang/Runtime/descriptor.h"
#include "flang/Runtime/io-api.h"
-#include "tools.h"
#include <algorithm>
#include <cinttypes>
#include <complex>
diff --git a/FortranRuntime/unittests/Runtime/Numeric.cpp b/FortranRuntime/unittests/Runtime/Numeric.cpp
index fb595ae262..d15919b972 100644
--- a/FortranRuntime/unittests/Runtime/Numeric.cpp
+++ b/FortranRuntime/unittests/Runtime/Numeric.cpp
@@ -7,8 +7,8 @@
//===----------------------------------------------------------------------===//
#include "flang/Runtime/numeric.h"
-#include "flang/Common/float128.h"
#include "gtest/gtest.h"
+#include "flang/Common/float128.h"
#include <cmath>
#include <limits>
diff --git a/FortranRuntime/unittests/Runtime/Pointer.cpp b/FortranRuntime/unittests/Runtime/Pointer.cpp
index a05bd70a64..aa8545cdf9 100644
--- a/FortranRuntime/unittests/Runtime/Pointer.cpp
+++ b/FortranRuntime/unittests/Runtime/Pointer.cpp
@@ -7,9 +7,9 @@
//===----------------------------------------------------------------------===//
#include "flang/Runtime/pointer.h"
-#include "flang/Runtime/descriptor.h"
-#include "tools.h"
#include "gtest/gtest.h"
+#include "tools.h"
+#include "flang/Runtime/descriptor.h"
using namespace Fortran::runtime;
diff --git a/FortranRuntime/unittests/Runtime/Random.cpp b/FortranRuntime/unittests/Runtime/Random.cpp
index 4e4b59cbcf..c2300a4788 100644
--- a/FortranRuntime/unittests/Runtime/Random.cpp
+++ b/FortranRuntime/unittests/Runtime/Random.cpp
@@ -7,9 +7,9 @@
//===----------------------------------------------------------------------===//
#include "flang/Runtime//random.h"
+#include "gtest/gtest.h"
#include "flang/Runtime/descriptor.h"
#include "flang/Runtime/type-code.h"
-#include "gtest/gtest.h"
#include <cmath>
using namespace Fortran::runtime;
diff --git a/FortranRuntime/unittests/Runtime/Reduction.cpp b/FortranRuntime/unittests/Runtime/Reduction.cpp
index c35f6e2fa6..e8b5ac8788 100644
--- a/FortranRuntime/unittests/Runtime/Reduction.cpp
+++ b/FortranRuntime/unittests/Runtime/Reduction.cpp
@@ -7,14 +7,14 @@
//===----------------------------------------------------------------------===//
#include "flang/Runtime/reduction.h"
+#include "gtest/gtest.h"
+#include "tools.h"
#include "flang/Common/float128.h"
#include "flang/Runtime/allocatable.h"
#include "flang/Runtime/cpp-type.h"
#include "flang/Runtime/descriptor.h"
#include "flang/Runtime/reduce.h"
#include "flang/Runtime/type-code.h"
-#include "tools.h"
-#include "gtest/gtest.h"
#include <cstdint>
#include <cstring>
#include <string>
diff --git a/FortranRuntime/unittests/Runtime/RuntimeCrashTest.cpp b/FortranRuntime/unittests/Runtime/RuntimeCrashTest.cpp
index 61580a8d46..7ce1ee796d 100644
--- a/FortranRuntime/unittests/Runtime/RuntimeCrashTest.cpp
+++ b/FortranRuntime/unittests/Runtime/RuntimeCrashTest.cpp
@@ -10,11 +10,11 @@
/// runtime components and ensure the test fixture handles crashes as we expect.
//
//===----------------------------------------------------------------------===//
-#include "../../lib/Runtime/terminator.h"
#include "CrashHandlerFixture.h"
+#include "tools.h"
+#include "../../lib/Runtime/terminator.h"
#include "flang/Runtime/io-api.h"
#include "flang/Runtime/transformational.h"
-#include "tools.h"
#include <gtest/gtest.h>
using namespace Fortran::runtime;
diff --git a/FortranRuntime/unittests/Runtime/Stop.cpp b/FortranRuntime/unittests/Runtime/Stop.cpp
index 5fd8deaad2..c12ec09706 100644
--- a/FortranRuntime/unittests/Runtime/Stop.cpp
+++ b/FortranRuntime/unittests/Runtime/Stop.cpp
@@ -10,8 +10,8 @@
//
//===----------------------------------------------------------------------===//
#include "flang/Runtime/stop.h"
-#include "../../lib/Runtime/environment.h"
#include "CrashHandlerFixture.h"
+#include "../../lib/Runtime/environment.h"
#include <cstdlib>
#include <gtest/gtest.h>
diff --git a/FortranRuntime/unittests/Runtime/Support.cpp b/FortranRuntime/unittests/Runtime/Support.cpp
index 38c0d6efaf..b7aa39ef55 100644
--- a/FortranRuntime/unittests/Runtime/Support.cpp
+++ b/FortranRuntime/unittests/Runtime/Support.cpp
@@ -7,9 +7,9 @@
//===----------------------------------------------------------------------===//
#include "flang/Runtime/support.h"
-#include "flang/Runtime/descriptor.h"
-#include "tools.h"
#include "gtest/gtest.h"
+#include "tools.h"
+#include "flang/Runtime/descriptor.h"
using namespace Fortran::runtime;
using Fortran::common::TypeCategory;
diff --git a/FortranRuntime/unittests/Runtime/TemporaryStack.cpp b/FortranRuntime/unittests/Runtime/TemporaryStack.cpp
index 63d99416ea..495c693b04 100644
--- a/FortranRuntime/unittests/Runtime/TemporaryStack.cpp
+++ b/FortranRuntime/unittests/Runtime/TemporaryStack.cpp
@@ -6,14 +6,14 @@
//
//===----------------------------------------------------------------------===//
+#include "gtest/gtest.h"
+#include "tools.h"
#include "flang/Common/ISO_Fortran_binding_wrapper.h"
#include "flang/Runtime/allocatable.h"
#include "flang/Runtime/cpp-type.h"
#include "flang/Runtime/descriptor.h"
#include "flang/Runtime/temporary-stack.h"
#include "flang/Runtime/type-code.h"
-#include "tools.h"
-#include "gtest/gtest.h"
#include <vector>
using namespace Fortran::runtime;
diff --git a/FortranRuntime/unittests/Runtime/Time.cpp b/FortranRuntime/unittests/Runtime/Time.cpp
index 6fd00d669a..548c0834e3 100644
--- a/FortranRuntime/unittests/Runtime/Time.cpp
+++ b/FortranRuntime/unittests/Runtime/Time.cpp
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#include "flang/Runtime/time-intrinsic.h"
#include "gtest/gtest.h"
+#include "flang/Runtime/time-intrinsic.h"
#include <algorithm>
#include <cctype>
#include <cerrno>
diff --git a/FortranRuntime/unittests/Runtime/Transformational.cpp b/FortranRuntime/unittests/Runtime/Transformational.cpp
index b5a4e0e8e9..34fcaaf8e2 100644
--- a/FortranRuntime/unittests/Runtime/Transformational.cpp
+++ b/FortranRuntime/unittests/Runtime/Transformational.cpp
@@ -7,10 +7,10 @@
//===----------------------------------------------------------------------===//
#include "flang/Runtime/transformational.h"
+#include "gtest/gtest.h"
+#include "tools.h"
#include "flang/Common/float128.h"
#include "flang/Runtime/type-code.h"
-#include "tools.h"
-#include "gtest/gtest.h"
#include <vector>
using namespace Fortran::runtime;
@@ -26,8 +26,8 @@ using BesselX0FuncType =
std::function<void(Descriptor &, int32_t, int32_t, const char *, int)>;
template <int KIND>
-constexpr CppTypeFor<TypeCategory::Real, KIND>
- besselEpsilon = CppTypeFor<TypeCategory::Real, KIND>(1e-4);
+constexpr CppTypeFor<TypeCategory::Real, KIND> besselEpsilon =
+ CppTypeFor<TypeCategory::Real, KIND>(1e-4);
template <int KIND>
static void testBesselJn(BesselFuncType<KIND> rtFunc, int32_t n1, int32_t n2,
diff --git a/FortranRuntime/unittests/Runtime/tools.h b/FortranRuntime/unittests/Runtime/tools.h
index 702103d225..65a74558ba 100644
--- a/FortranRuntime/unittests/Runtime/tools.h
+++ b/FortranRuntime/unittests/Runtime/tools.h
@@ -9,11 +9,11 @@
#ifndef FORTRAN_UNITTESTS_RUNTIME_TOOLS_H_
#define FORTRAN_UNITTESTS_RUNTIME_TOOLS_H_
+#include "gtest/gtest.h"
#include "flang/Runtime/allocatable.h"
#include "flang/Runtime/cpp-type.h"
#include "flang/Runtime/descriptor.h"
#include "flang/Runtime/type-code.h"
-#include "gtest/gtest.h"
#include <cstdint>
#include <cstring>
#include <vector>
diff --git a/flang/include/flang/Optimizer/Builder/IntrinsicCall.h b/flang/include/flang/Optimizer/Builder/IntrinsicCall.h
index 3fc4201bd1..567e5a8226 100644
--- a/flang/include/flang/Optimizer/Builder/IntrinsicCall.h
+++ b/flang/include/flang/Optimizer/Builder/IntrinsicCall.h
@@ -397,7 +397,8 @@ struct IntrinsicLibrary {
fir::ExtendedValue genUbound(mlir::Type, llvm::ArrayRef<fir::ExtendedValue>);
fir::ExtendedValue genUnpack(mlir::Type, llvm::ArrayRef<fir::ExtendedValue>);
fir::ExtendedValue genVerify(mlir::Type, llvm::ArrayRef<fir::ExtendedValue>);
- fir::ExtendedValue genNumericStorageSize(mlir::Type, llvm::ArrayRef<fir::ExtendedValue>);
+ fir::ExtendedValue genNumericStorageSize(mlir::Type,
+ llvm::ArrayRef<fir::ExtendedValue>);
/// Implement all conversion functions like DBLE, the first argument is
/// the value to convert. There may be an additional KIND arguments that
diff --git a/flang/lib/Evaluate/common.cpp b/flang/lib/Evaluate/common.cpp
index ed040b0728..c633bff57b 100644
--- a/flang/lib/Evaluate/common.cpp
+++ b/flang/lib/Evaluate/common.cpp
@@ -11,11 +11,8 @@
using namespace Fortran::parser::literals;
-
-
namespace Fortran::evaluate {
-
void RealFlagWarnings(
FoldingContext &context, const RealFlags &flags, const char *operation) {
if (context.languageFeatures().ShouldWarn(
``````````
</details>
https://github.com/llvm/llvm-project/pull/110298
More information about the llvm-branch-commits
mailing list