43 changes: 32 additions & 11 deletions flang/module/mma.f90 → FortranRuntime/module/mma.f90
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,18 @@ pure __vector_pair function func_vpi0vp(arg1, arg2); \
!dir$ ignore_tkr(r) arg2; \
end function;

FUNC_VPI0VI(1) FUNC_VPI0VI(2) FUNC_VPI0VI(4) FUNC_VPI0VI(8)
FUNC_VPI0VU(1) FUNC_VPI0VU(2) FUNC_VPI0VU(4) FUNC_VPI0VU(8)
FUNC_VPI0VR(4) FUNC_VPI0VR(8)
! FIXME: Potential Flang bug: combining multiple of those on a single line breaks after preprocessing as an explicit step as done by CMake
! Line counting is also wrong
FUNC_VPI0VI(1)
FUNC_VPI0VI(2)
FUNC_VPI0VI(4)
FUNC_VPI0VI(8)
FUNC_VPI0VU(1)
FUNC_VPI0VU(2)
FUNC_VPI0VU(4)
FUNC_VPI0VU(8)
FUNC_VPI0VR(4)
FUNC_VPI0VR(8)
FUNC_VPI0VP

#undef FUNC_VPI0VP
Expand Down Expand Up @@ -144,14 +153,26 @@ elemental subroutine sub_vpvr##VKIND##vr##VKIND(pair, arg1, arg2); \
vector(real(VKIND)), intent(in) :: arg1, arg2; \
end subroutine ;

ELEM_SUB_VPVIVI(1) ELEM_SUB_VPVIVI(2)
ELEM_SUB_VPVIVI(4) ELEM_SUB_VPVIVI(8)
ELEM_SUB_VPVUVU(1) ELEM_SUB_VPVUVU(2)
ELEM_SUB_VPVUVU(4) ELEM_SUB_VPVUVU(8)
ELEM_SUB_VPVRVR(4) ELEM_SUB_VPVRVR(8)
SUB_VPI0VI(1) SUB_VPI0VI(2) SUB_VPI0VI(4) SUB_VPI0VI(8)
SUB_VPI0VU(1) SUB_VPI0VU(2) SUB_VPI0VU(4) SUB_VPI0VU(8)
SUB_VPI0VR(4) SUB_VPI0VR(8)
ELEM_SUB_VPVIVI(1)
ELEM_SUB_VPVIVI(2)
ELEM_SUB_VPVIVI(4)
ELEM_SUB_VPVIVI(8)
ELEM_SUB_VPVUVU(1)
ELEM_SUB_VPVUVU(2)
ELEM_SUB_VPVUVU(4)
ELEM_SUB_VPVUVU(8)
ELEM_SUB_VPVRVR(4)
ELEM_SUB_VPVRVR(8)
SUB_VPI0VI(1)
SUB_VPI0VI(2)
SUB_VPI0VI(4)
SUB_VPI0VI(8)
SUB_VPI0VU(1)
SUB_VPI0VU(2)
SUB_VPI0VU(4)
SUB_VPI0VU(8)
SUB_VPI0VR(4)
SUB_VPI0VR(8)

#undef ELEM_SUB_VPVIVI
#undef ELEM_SUB_VPVUVU
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
//===-- flang/unittests/Common/FastIntSetTest.cpp ---------------*- C++ -*-===//
//===-- unittests/Common/FastIntSetTest.cpp ---------------------*- 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
//
//===----------------------------------------------------------------------===//

#include "gtest/gtest.h"
#include "flang/Common/fast-int-set.h"
#include "gtest/gtest.h"
#include <optional>

TEST(FastIntSetTests, Sanity) {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
#include "flang/Decimal/decimal.h"
//===-- unittests/Decimal/quick-sanity-test.cpp -----------------*- 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
//
//===----------------------------------------------------------------------===//

#include "flang/Common/decimal.h"
#include "llvm/Support/raw_ostream.h"
#include <cinttypes>
#include <cstdio>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
#include "flang/Decimal/decimal.h"
//===-- unittests/Decimal/thorough-test.cpp ---------------------*- 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
//
//===----------------------------------------------------------------------===//

#include "flang/Common/decimal.h"
#include "llvm/Support/raw_ostream.h"
#include <cinttypes>
#include <cstdio>
Expand Down
6 changes: 6 additions & 0 deletions FortranRuntime/unittests/Evaluate/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
add_flang_nongtest_unittest(reshape
FortranEvaluateTesting
FortranSemantics
FortranEvaluate
FortranRuntime
)
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
#include "testing.h"
#include "flang/ISO_Fortran_binding_wrapper.h"
//===-- unittests/Evaluate/ISO-Fortran-binding.cpp --------------*- 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
//
//===----------------------------------------------------------------------===//

#include "flang/Common/ISO_Fortran_binding_wrapper.h"
#include "flang/Runtime/descriptor.h"
#include "flang/Testing/testing.h"
#include "llvm/Support/raw_ostream.h"
#include <type_traits>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
#include "testing.h"
//===-- unittests/Evaluate/reshape.cpp --------------------------*- 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
//
//===----------------------------------------------------------------------===//

#include "flang/Runtime/descriptor.h"
#include "flang/Runtime/transformational.h"
#include "flang/Testing/testing.h"
#include <cinttypes>

using namespace Fortran::common;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- flang/unittests/Runtime/AccessTest.cpp ----------------------------===//
//===-- unittests/Runtime/AccessTest.cpp ------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
Expand All @@ -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>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- flang/unittests/Runtime/Allocatable.cpp--------- ---------*- C++-*-===//
//===-- unittests/Runtime/Allocatable.cpp -----------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
Expand All @@ -7,8 +7,8 @@
//===----------------------------------------------------------------------===//

#include "flang/Runtime/allocatable.h"
#include "gtest/gtest.h"
#include "tools.h"
#include "gtest/gtest.h"

using namespace Fortran::runtime;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
//===-- flang/unittests/Runtime/ArrayConstructor.cpp-------------*- C++ -*-===//
//===-- unittests/Runtime/ArrayConstructor.cpp ------------------*- 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
//
//===----------------------------------------------------------------------===//

#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>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//===-- flang/unittests/Runtime/BufferTest.cpp ------------------*- C++ -*-===//
//===-- unittests/Runtime/BufferTest.cpp ------------------------*- 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
//
//===----------------------------------------------------------------------===//

#include "../../runtime/buffer.h"
#include "../../lib/Runtime/buffer.h"
#include "CrashHandlerFixture.h"
#include "gtest/gtest.h"
#include <algorithm>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
//===-- flang/unittests/Runtime/AllocatableCUF.cpp ---------------*- C++-*-===//
//===-- unittests/Runtime/CUDA/AllocatorCUF.cpp -----------------*- 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
//
//===----------------------------------------------------------------------===//

#include "gtest/gtest.h"
#include "../../../runtime/terminator.h"
#include "flang/Common/Fortran.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"

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- flang/unittests/Runtime/CharacterTest.cpp ---------------*- C++ -*-===//
//===-- unittests/Runtime/CharacterTest.cpp ---------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
Expand All @@ -10,8 +10,8 @@
// in Fortran.

#include "flang/Runtime/character.h"
#include "gtest/gtest.h"
#include "flang/Runtime/descriptor.h"
#include "gtest/gtest.h"
#include <cstring>
#include <functional>
#include <tuple>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- flang/unittests/Runtime/CommandTest.cpp ---------------------------===//
//===-- unittests/Runtime/CommandTest.cpp -----------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
Expand All @@ -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>

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//===-- flang/unittests/Runtime/CrashHandlerFixture.cpp ---------*- C++ -*-===//
//===-- unittests/Runtime/CrashHandlerFixture.cpp ---------------*- 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
//
//===----------------------------------------------------------------------===//
#include "CrashHandlerFixture.h"
#include "../../runtime/terminator.h"
#include "../../lib/Runtime/terminator.h"
#include <cstdarg>
#include <cstdlib>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- flang/unittests/Runtime/CrashHandlerFixture.h -----------*- C++ -*-===//
//===-- unittests/Runtime/CrashHandlerFixture.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.
Expand All @@ -10,12 +10,12 @@
/// with expected message.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_FLANG_UNITTESTS_RUNTIMEGTEST_CRASHHANDLERFIXTURE_H
#define LLVM_FLANG_UNITTESTS_RUNTIMEGTEST_CRASHHANDLERFIXTURE_H
#ifndef FORTRAN_UNITTESTS_RUNTIME_CRASHHANDLERFIXTURE_H_
#define FORTRAN_UNITTESTS_RUNTIME_CRASHHANDLERFIXTURE_H_
#include <gtest/gtest.h>

struct CrashHandlerFixture : testing::Test {
void SetUp();
};

#endif
#endif /* FORTRAN_UNITTESTS_RUNTIME_CRASHHANDLERFIXTURE_H_ */
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
//===-- flang/unittests/Runtime/Pointer.cpp--------- -------------*- C++-*-===//
//===-- unittests/Runtime/Derived.cpp ---------------------------*- 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
//
//===----------------------------------------------------------------------===//

#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;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- flang/unittests/RuntimeGTest/ExternalIOTest.cpp ---------*- C++ -*-===//
//===-- unittests/Runtime/ExternalIOTest.cpp --------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
Expand All @@ -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>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- flang/unittests/Runtime/Format.cpp ----------------------*- C++ -*-===//
//===-- unittests/Runtime/Format.cpp ----------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
Expand All @@ -7,9 +7,9 @@
//===----------------------------------------------------------------------===//

#include "CrashHandlerFixture.h"
#include "../runtime/connection.h"
#include "../runtime/format-implementation.h"
#include "../runtime/io-error.h"
#include "../../lib/Runtime/connection.h"
#include "../../lib/Runtime/format-implementation.h"
#include "../../lib/Runtime/io-error.h"
#include <optional>
#include <string>
#include <tuple>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- flang/unittests/Runtime/Inquiry.cpp -------------------------------===//
//===-- unittests/Runtime/Inquiry.cpp ---------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
Expand All @@ -7,9 +7,9 @@
//===----------------------------------------------------------------------===//

#include "flang/Runtime/inquiry.h"
#include "gtest/gtest.h"
#include "tools.h"
#include "flang/Runtime/type-code.h"
#include "tools.h"
#include "gtest/gtest.h"

using namespace Fortran::runtime;
using Fortran::common::TypeCategory;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
//===-- flang/unittests/Runtime/ListInputTest.cpp ---------------*- C++ -*-===//
//===-- unittests/Runtime/ListInputTest.cpp ---------------------*- 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
//
//===----------------------------------------------------------------------===//

#include "../../lib/Runtime/io-error.h"
#include "CrashHandlerFixture.h"
#include "../../runtime/io-error.h"
#include "flang/Runtime/descriptor.h"
#include "flang/Runtime/io-api.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- flang/unittests/Runtime/LogicalFormatTest.cpp -----------*- C++ -*-===//
//===-- unittests/Runtime/LogicalFormatTest.cpp -----------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- flang/unittests/Runtime/Matmul.cpp--------- -------------*- C++ -*-===//
//===-- unittests/Runtime/Matmul.cpp ----------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
//===-- flang/unittests/Runtime/MatmulTranspose.cpp -------------*- C++ -*-===//
//===-- unittests/Runtime/MatmulTranspose.cpp -------------------*- 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
//
//===----------------------------------------------------------------------===//

#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;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
//===-- flang/unittests/Runtime/MiscIntrinsic.cpp ---------------*- C++ -*-===//
//===-- unittests/Runtime/MiscIntrinsic.cpp ---------------------*- 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
//
//===----------------------------------------------------------------------===//

#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;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
//===-- flang/unittests/Runtime/Namelist.cpp --------------------*- C++ -*-===//
//===-- unittests/Runtime/Namelist.cpp --------------------------*- 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
//
//===----------------------------------------------------------------------===//

#include "../../runtime/namelist.h"
#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>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- flang/unittests/Runtime/Numeric.cpp ---------------------*- C++ -*-===//
//===-- unittests/Runtime/Numeric.cpp ---------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
Expand All @@ -7,8 +7,8 @@
//===----------------------------------------------------------------------===//

#include "flang/Runtime/numeric.h"
#include "gtest/gtest.h"
#include "flang/Common/float128.h"
#include "gtest/gtest.h"
#include <cmath>
#include <limits>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- flang/unittests/Runtime/NumericalFormatTest.cpp ---------*- C++ -*-===//
//===-- unittests/Runtime/NumericalFormatTest.cpp ---------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- flang/unittests/Runtime/Pointer.cpp--------- -------------*- C++-*-===//
//===-- unittests/Runtime/Pointer.cpp ---------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
Expand All @@ -7,9 +7,9 @@
//===----------------------------------------------------------------------===//

#include "flang/Runtime/pointer.h"
#include "gtest/gtest.h"
#include "tools.h"
#include "flang/Runtime/descriptor.h"
#include "tools.h"
#include "gtest/gtest.h"

using namespace Fortran::runtime;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- flang/unittests/Runtime/Ragged.cpp ----------------------*- C++ -*-===//
//===-- unittests/Runtime/Ragged.cpp ----------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- flang/unittests/Runtime/Random.cpp ----------------------*- C++ -*-===//
//===-- unittests/Runtime/Random.cpp ----------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- flang/unittests/Runtime/Reductions.cpp ----------------------------===//
//===-- unittests/Runtime/Reduction.cpp -------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
Expand All @@ -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>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- flang/unittests/Runtime/CrashHandlerFixture.cpp ---------*- C++ -*-===//
//===-- unittests/Runtime/RuntimeCrashTest.cpp ------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
Expand All @@ -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 "../../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;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- flang/unittests/Runtime/Stop.cpp ----------------------------------===//
//===-- unittests/Runtime/Stop.cpp ------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
Expand All @@ -10,8 +10,8 @@
//
//===----------------------------------------------------------------------===//
#include "flang/Runtime/stop.h"
#include "../../lib/Runtime/environment.h"
#include "CrashHandlerFixture.h"
#include "../../runtime/environment.h"
#include <cstdlib>
#include <gtest/gtest.h>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- flang/unittests/Runtime/Support.cpp ----------------------*- C++-*-===//
//===-- unittests/Runtime/Support.cpp ---------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
Expand All @@ -7,9 +7,9 @@
//===----------------------------------------------------------------------===//

#include "flang/Runtime/support.h"
#include "gtest/gtest.h"
#include "tools.h"
#include "flang/Runtime/descriptor.h"
#include "tools.h"
#include "gtest/gtest.h"

using namespace Fortran::runtime;
using Fortran::common::TypeCategory;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
//===--- flang/unittests/Runtime/TemporaryStack.cpp -------------*- C++ -*-===//
//===-- unittests/Runtime/TemporaryStack.cpp --------------------*- 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
//
//===----------------------------------------------------------------------===//

#include "gtest/gtest.h"
#include "tools.h"
#include "flang/ISO_Fortran_binding_wrapper.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;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
//===-- flang/unittests/Runtime/Time.cpp ----------------------------===//
//===-- unittests/Runtime/Time.cpp ------------------------------*- 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
//
//===----------------------------------------------------------------------===//

#include "gtest/gtest.h"
#include "flang/Runtime/time-intrinsic.h"
#include "gtest/gtest.h"
#include <algorithm>
#include <cctype>
#include <cerrno>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- flang/unittests/Runtime/Transformational.cpp ----------------------===//
//===-- unittests/Runtime/Transformational.cpp ------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- flang/unittests/Runtime/tools.h -------------------------*- C++ -*-===//
//===-- unittests/Runtime/tools.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.
Expand All @@ -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>
Expand Down Expand Up @@ -54,4 +54,4 @@ static OwningPtr<Descriptor> MakeArray(const std::vector<int> &shape,
}

} // namespace Fortran::runtime
#endif // FORTRAN_UNITTESTS_RUNTIME_TOOLS_H_
#endif /* FORTRAN_UNITTESTS_RUNTIME_TOOLS_H_ */
7 changes: 4 additions & 3 deletions flang/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,8 @@ set(LLVM_BUILD_TOOLS ON)

include_directories(BEFORE
${FLANG_BINARY_DIR}/include
${FLANG_SOURCE_DIR}/include)
${FLANG_SOURCE_DIR}/include
${FLANG_SOURCE_DIR}/../FortranRuntime/include)

# Add Flang-centric modules to cmake path.
list(INSERT CMAKE_MODULE_PATH 0
Expand Down Expand Up @@ -468,7 +469,7 @@ if (FLANG_CUF_RUNTIME)
find_package(CUDAToolkit REQUIRED)
endif()

add_subdirectory(runtime)
add_subdirectory(../FortranRuntime/lib/Runtime runtime)

if (LLVM_INCLUDE_EXAMPLES)
add_subdirectory(examples)
Expand Down Expand Up @@ -537,7 +538,7 @@ endif()
include(GetClangResourceDir)
get_clang_resource_dir(HEADER_BINARY_DIR PREFIX ${LLVM_LIBRARY_OUTPUT_INTDIR}/.. SUBDIR include)
configure_file(
${FLANG_SOURCE_DIR}/include/flang/ISO_Fortran_binding.h
../FortranRuntime/include/flang/Common/ISO_Fortran_binding.h
${HEADER_BINARY_DIR}/ISO_Fortran_binding.h)

# And also install it into the install area
Expand Down
6 changes: 3 additions & 3 deletions flang/include/flang/Evaluate/call.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
#include "constant.h"
#include "formatting.h"
#include "type.h"
#include "flang/Common/Fortran.h"
#include "flang/Common/indirection.h"
#include "flang/Common/reference.h"
#include "flang/Parser/char-block.h"
#include "flang/Semantics/attr.h"
#include "flang/Support/Fortran.h"
#include "flang/Support/indirection.h"
#include "flang/Support/reference.h"
#include <optional>
#include <vector>

Expand Down
6 changes: 3 additions & 3 deletions flang/include/flang/Evaluate/characteristics.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
#include "shape.h"
#include "tools.h"
#include "type.h"
#include "flang/Common/Fortran-features.h"
#include "flang/Common/Fortran.h"
#include "flang/Common/enum-set.h"
#include "flang/Common/idioms.h"
#include "flang/Common/indirection.h"
#include "flang/Parser/char-block.h"
#include "flang/Semantics/symbol.h"
#include "flang/Support/Fortran-features.h"
#include "flang/Support/Fortran.h"
#include "flang/Support/indirection.h"
#include <optional>
#include <string>
#include <variant>
Expand Down
8 changes: 4 additions & 4 deletions flang/include/flang/Evaluate/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@
#ifndef FORTRAN_EVALUATE_COMMON_H_
#define FORTRAN_EVALUATE_COMMON_H_

#include "flang/Common/Fortran-features.h"
#include "flang/Common/Fortran.h"
#include "flang/Common/default-kinds.h"
#include "flang/Common/enum-set.h"
#include "flang/Common/idioms.h"
#include "flang/Common/indirection.h"
#include "flang/Common/restorer.h"
#include "flang/Common/target-rounding.h"
#include "flang/Parser/char-block.h"
#include "flang/Parser/message.h"
#include "flang/Support/Fortran-features.h"
#include "flang/Support/Fortran.h"
#include "flang/Support/default-kinds.h"
#include "flang/Support/indirection.h"
#include <cinttypes>
#include <map>
#include <set>
Expand Down
4 changes: 2 additions & 2 deletions flang/include/flang/Evaluate/constant.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

#include "formatting.h"
#include "type.h"
#include "flang/Common/default-kinds.h"
#include "flang/Common/reference.h"
#include "flang/Support/default-kinds.h"
#include "flang/Support/reference.h"
#include <map>
#include <vector>

Expand Down
6 changes: 3 additions & 3 deletions flang/include/flang/Evaluate/expression.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
#include "formatting.h"
#include "type.h"
#include "variable.h"
#include "flang/Common/Fortran.h"
#include "flang/Common/idioms.h"
#include "flang/Common/indirection.h"
#include "flang/Common/template.h"
#include "flang/Parser/char-block.h"
#include "flang/Support/Fortran.h"
#include "flang/Support/indirection.h"
#include "flang/Support/template.h"
#include <algorithm>
#include <list>
#include <tuple>
Expand Down
2 changes: 1 addition & 1 deletion flang/include/flang/Evaluate/formatting.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// This header is meant to be included by the headers that define the several
// representational class templates that need it, not by external clients.

#include "flang/Common/indirection.h"
#include "flang/Support/indirection.h"
#include "llvm/Support/raw_ostream.h"
#include <optional>
#include <type_traits>
Expand Down
2 changes: 1 addition & 1 deletion flang/include/flang/Evaluate/intrinsics.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
#include "call.h"
#include "characteristics.h"
#include "type.h"
#include "flang/Common/default-kinds.h"
#include "flang/Parser/char-block.h"
#include "flang/Parser/message.h"
#include "flang/Support/default-kinds.h"
#include <memory>
#include <optional>
#include <string>
Expand Down
2 changes: 1 addition & 1 deletion flang/include/flang/Evaluate/shape.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#include "expression.h"
#include "traverse.h"
#include "variable.h"
#include "flang/Common/indirection.h"
#include "flang/Evaluate/type.h"
#include "flang/Support/indirection.h"
#include <optional>
#include <variant>

Expand Down
2 changes: 1 addition & 1 deletion flang/include/flang/Evaluate/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
#ifndef FORTRAN_EVALUATE_TARGET_H_
#define FORTRAN_EVALUATE_TARGET_H_

#include "flang/Common/Fortran.h"
#include "flang/Common/enum-class.h"
#include "flang/Common/enum-set.h"
#include "flang/Common/target-rounding.h"
#include "flang/Evaluate/common.h"
#include "flang/Support/Fortran.h"
#include <cstdint>

namespace Fortran::evaluate {
Expand Down
4 changes: 2 additions & 2 deletions flang/include/flang/Evaluate/tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

#include "traverse.h"
#include "flang/Common/idioms.h"
#include "flang/Common/template.h"
#include "flang/Common/unwrap.h"
#include "flang/Evaluate/constant.h"
#include "flang/Evaluate/expression.h"
#include "flang/Evaluate/shape.h"
Expand All @@ -21,6 +19,8 @@
#include "flang/Semantics/attr.h"
#include "flang/Semantics/scope.h"
#include "flang/Semantics/symbol.h"
#include "flang/Support/template.h"
#include "flang/Support/unwrap.h"
#include <array>
#include <optional>
#include <set>
Expand Down
2 changes: 1 addition & 1 deletion flang/include/flang/Evaluate/traverse.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
// expression of an ASSOCIATE (or related) construct entity.

#include "expression.h"
#include "flang/Common/indirection.h"
#include "flang/Semantics/symbol.h"
#include "flang/Semantics/type.h"
#include "flang/Support/indirection.h"
#include <set>
#include <type_traits>

Expand Down
6 changes: 3 additions & 3 deletions flang/include/flang/Evaluate/type.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
#include "integer.h"
#include "logical.h"
#include "real.h"
#include "flang/Common/Fortran-features.h"
#include "flang/Common/Fortran.h"
#include "flang/Common/idioms.h"
#include "flang/Common/real.h"
#include "flang/Common/template.h"
#include "flang/Support/Fortran-features.h"
#include "flang/Support/Fortran.h"
#include "flang/Support/template.h"
#include <cinttypes>
#include <optional>
#include <string>
Expand Down
4 changes: 2 additions & 2 deletions flang/include/flang/Evaluate/variable.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
#include "static-data.h"
#include "type.h"
#include "flang/Common/idioms.h"
#include "flang/Common/reference.h"
#include "flang/Common/template.h"
#include "flang/Parser/char-block.h"
#include "flang/Support/reference.h"
#include "flang/Support/template.h"
#include <optional>
#include <variant>
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion flang/include/flang/Frontend/FrontendOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
#ifndef FORTRAN_FRONTEND_FRONTENDOPTIONS_H
#define FORTRAN_FRONTEND_FRONTENDOPTIONS_H

#include "flang/Common/Fortran-features.h"
#include "flang/Lower/EnvironmentDefault.h"
#include "flang/Parser/characters.h"
#include "flang/Parser/unparse.h"
#include "flang/Support/Fortran-features.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/MemoryBuffer.h"
#include <cstdint>
Expand Down
2 changes: 1 addition & 1 deletion flang/include/flang/Lower/AbstractConverter.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
#ifndef FORTRAN_LOWER_ABSTRACTCONVERTER_H
#define FORTRAN_LOWER_ABSTRACTCONVERTER_H

#include "flang/Common/Fortran.h"
#include "flang/Lower/LoweringOptions.h"
#include "flang/Lower/PFTDefs.h"
#include "flang/Optimizer/Builder/BoxValue.h"
#include "flang/Optimizer/Dialect/FIRAttr.h"
#include "flang/Semantics/symbol.h"
#include "flang/Support/Fortran.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/Operation.h"
Expand Down
2 changes: 1 addition & 1 deletion flang/include/flang/Lower/Bridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
#ifndef FORTRAN_LOWER_BRIDGE_H
#define FORTRAN_LOWER_BRIDGE_H

#include "flang/Common/Fortran.h"
#include "flang/Lower/AbstractConverter.h"
#include "flang/Lower/EnvironmentDefault.h"
#include "flang/Lower/LoweringOptions.h"
#include "flang/Lower/StatementContext.h"
#include "flang/Optimizer/Builder/FIRBuilder.h"
#include "flang/Optimizer/Dialect/Support/KindMapping.h"
#include "flang/Support/Fortran.h"
#include "mlir/IR/BuiltinOps.h"
#include <set>

Expand Down
2 changes: 1 addition & 1 deletion flang/include/flang/Lower/CallInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
#ifndef FORTRAN_LOWER_CALLINTERFACE_H
#define FORTRAN_LOWER_CALLINTERFACE_H

#include "flang/Common/reference.h"
#include "flang/Evaluate/characteristics.h"
#include "flang/Support/reference.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/IR/BuiltinOps.h"
#include <memory>
Expand Down
2 changes: 1 addition & 1 deletion flang/include/flang/Lower/ConvertType.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#ifndef FORTRAN_LOWER_CONVERT_TYPE_H
#define FORTRAN_LOWER_CONVERT_TYPE_H

#include "flang/Common/Fortran.h"
#include "flang/Evaluate/type.h"
#include "flang/Support/Fortran.h"
#include "mlir/IR/BuiltinTypes.h"

namespace mlir {
Expand Down
2 changes: 1 addition & 1 deletion flang/include/flang/Lower/LoweringOptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#ifndef FLANG_LOWER_LOWERINGOPTIONS_H
#define FLANG_LOWER_LOWERINGOPTIONS_H

#include "flang/Common/MathOptionsBase.h"
#include "flang/Support/MathOptionsBase.h"

namespace Fortran::lower {

Expand Down
4 changes: 2 additions & 2 deletions flang/include/flang/Lower/PFTBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
#ifndef FORTRAN_LOWER_PFTBUILDER_H
#define FORTRAN_LOWER_PFTBUILDER_H

#include "flang/Common/reference.h"
#include "flang/Common/template.h"
#include "flang/Lower/HostAssociations.h"
#include "flang/Lower/PFTDefs.h"
#include "flang/Parser/parse-tree.h"
#include "flang/Semantics/attr.h"
#include "flang/Semantics/scope.h"
#include "flang/Semantics/semantics.h"
#include "flang/Semantics/symbol.h"
#include "flang/Support/reference.h"
#include "flang/Support/template.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"

Expand Down
2 changes: 1 addition & 1 deletion flang/include/flang/Lower/Support/Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
#ifndef FORTRAN_LOWER_SUPPORT_UTILS_H
#define FORTRAN_LOWER_SUPPORT_UTILS_H

#include "flang/Common/indirection.h"
#include "flang/Parser/char-block.h"
#include "flang/Semantics/tools.h"
#include "flang/Support/indirection.h"
#include "mlir/Dialect/Arith/IR/Arith.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/IR/BuiltinAttributes.h"
Expand Down
2 changes: 1 addition & 1 deletion flang/include/flang/Lower/SymbolMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
#ifndef FORTRAN_LOWER_SYMBOLMAP_H
#define FORTRAN_LOWER_SYMBOLMAP_H

#include "flang/Common/reference.h"
#include "flang/Optimizer/Builder/BoxValue.h"
#include "flang/Optimizer/Dialect/FIRType.h"
#include "flang/Optimizer/Dialect/FortranVariableInterface.h"
#include "flang/Optimizer/Support/Matcher.h"
#include "flang/Semantics/symbol.h"
#include "flang/Support/reference.h"
#include "mlir/IR/Value.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
Expand Down
2 changes: 1 addition & 1 deletion flang/include/flang/Optimizer/Builder/FIRBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
#ifndef FORTRAN_OPTIMIZER_BUILDER_FIRBUILDER_H
#define FORTRAN_OPTIMIZER_BUILDER_FIRBUILDER_H

#include "flang/Common/MathOptionsBase.h"
#include "flang/Optimizer/Dialect/FIROps.h"
#include "flang/Optimizer/Dialect/FIROpsSupport.h"
#include "flang/Optimizer/Dialect/FIRType.h"
#include "flang/Optimizer/Dialect/Support/FIRContext.h"
#include "flang/Optimizer/Dialect/Support/KindMapping.h"
#include "flang/Support/MathOptionsBase.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/BuiltinOps.h"
#include "llvm/ADT/DenseMap.h"
Expand Down
1 change: 1 addition & 0 deletions flang/include/flang/Optimizer/Builder/IntrinsicCall.h
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ 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>);

/// Implement all conversion functions like DBLE, the first argument is
/// the value to convert. There may be an additional KIND arguments that
Expand Down
2 changes: 1 addition & 1 deletion flang/include/flang/Optimizer/Builder/PPCIntrinsicCall.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#ifndef FORTRAN_LOWER_PPCINTRINSICCALL_H
#define FORTRAN_LOWER_PPCINTRINSICCALL_H

#include "flang/Common/static-multimap-view.h"
#include "flang/Optimizer/Builder/IntrinsicCall.h"
#include "flang/Support/static-multimap-view.h"
#include "mlir/Dialect/Math/IR/Math.h"

namespace fir {
Expand Down
2 changes: 1 addition & 1 deletion flang/include/flang/Optimizer/Builder/Runtime/RTBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
#ifndef FORTRAN_OPTIMIZER_BUILDER_RUNTIME_RTBUILDER_H
#define FORTRAN_OPTIMIZER_BUILDER_RUNTIME_RTBUILDER_H

#include "flang/Common/Fortran.h"
#include "flang/Common/uint128.h"
#include "flang/Optimizer/Builder/FIRBuilder.h"
#include "flang/Optimizer/Dialect/FIRDialect.h"
#include "flang/Optimizer/Dialect/FIRType.h"
#include "flang/Runtime/reduce.h"
#include "flang/Support/Fortran.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/MLIRContext.h"
#include "llvm/ADT/SmallVector.h"
Expand Down
2 changes: 1 addition & 1 deletion flang/include/flang/Optimizer/CodeGen/DescriptorModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#ifndef OPTIMIZER_DESCRIPTOR_MODEL_H
#define OPTIMIZER_DESCRIPTOR_MODEL_H

#include "flang/ISO_Fortran_binding_wrapper.h"
#include "flang/Common/ISO_Fortran_binding_wrapper.h"
#include "flang/Runtime/descriptor.h"
#include "mlir/Dialect/LLVMIR/LLVMTypes.h"
#include "mlir/IR/BuiltinTypes.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#ifndef FORTRAN_OPTIMIZER_DIALECT_CUF_CUFATTR_H
#define FORTRAN_OPTIMIZER_DIALECT_CUF_CUFATTR_H

#include "flang/Common/Fortran.h"
#include "flang/Support/Fortran.h"
#include "mlir/IR/BuiltinAttributes.h"

namespace llvm {
Expand Down
2 changes: 1 addition & 1 deletion flang/include/flang/Optimizer/Support/TypeCode.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#ifndef FORTRAN_OPTIMIZER_SUPPORT_TYPECODE_H
#define FORTRAN_OPTIMIZER_SUPPORT_TYPECODE_H

#include "flang/ISO_Fortran_binding_wrapper.h"
#include "flang/Common/ISO_Fortran_binding_wrapper.h"
#include "llvm/Support/ErrorHandling.h"

namespace fir {
Expand Down
2 changes: 1 addition & 1 deletion flang/include/flang/Optimizer/Support/Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
#ifndef FORTRAN_OPTIMIZER_SUPPORT_UTILS_H
#define FORTRAN_OPTIMIZER_SUPPORT_UTILS_H

#include "flang/Common/default-kinds.h"
#include "flang/Optimizer/Builder/FIRBuilder.h"
#include "flang/Optimizer/Builder/Todo.h"
#include "flang/Optimizer/Dialect/CUF/Attributes/CUFAttr.h"
#include "flang/Optimizer/Dialect/FIROps.h"
#include "flang/Optimizer/Dialect/FIRType.h"
#include "flang/Optimizer/Support/FatalError.h"
#include "flang/Support/default-kinds.h"
#include "mlir/Dialect/Arith/IR/Arith.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/IR/BuiltinAttributes.h"
Expand Down
2 changes: 1 addition & 1 deletion flang/include/flang/Parser/char-block.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

// Describes a contiguous block of characters; does not own their storage.

#include "flang/Common/interval.h"
#include "flang/Support/interval.h"
#include <algorithm>
#include <cstddef>
#include <cstring>
Expand Down
4 changes: 2 additions & 2 deletions flang/include/flang/Parser/dump-parse-tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
#include "parse-tree.h"
#include "tools.h"
#include "unparse.h"
#include "flang/Common/Fortran.h"
#include "flang/Common/idioms.h"
#include "flang/Common/indirection.h"
#include "flang/Support/Fortran.h"
#include "flang/Support/indirection.h"
#include "llvm/Support/raw_ostream.h"
#include <string>
#include <type_traits>
Expand Down
2 changes: 1 addition & 1 deletion flang/include/flang/Parser/message.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
#include "char-set.h"
#include "provenance.h"
#include "flang/Common/idioms.h"
#include "flang/Common/reference-counted.h"
#include "flang/Common/restorer.h"
#include "flang/Support/reference-counted.h"
#include <cstddef>
#include <cstring>
#include <forward_list>
Expand Down
2 changes: 1 addition & 1 deletion flang/include/flang/Parser/parse-state.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
// and recovery during parsing!

#include "user-state.h"
#include "flang/Common/Fortran-features.h"
#include "flang/Common/idioms.h"
#include "flang/Parser/characters.h"
#include "flang/Parser/message.h"
#include "flang/Parser/provenance.h"
#include "flang/Support/Fortran-features.h"
#include <cstddef>
#include <cstring>
#include <list>
Expand Down
4 changes: 2 additions & 2 deletions flang/include/flang/Parser/parse-tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
#include "format-specification.h"
#include "message.h"
#include "provenance.h"
#include "flang/Common/Fortran.h"
#include "flang/Common/idioms.h"
#include "flang/Common/indirection.h"
#include "flang/Support/Fortran.h"
#include "flang/Support/indirection.h"
#include "llvm/Frontend/OpenACC/ACC.h.inc"
#include "llvm/Frontend/OpenMP/OMPConstants.h"
#include <cinttypes>
Expand Down
2 changes: 1 addition & 1 deletion flang/include/flang/Parser/parsing.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
#include "message.h"
#include "parse-tree.h"
#include "provenance.h"
#include "flang/Common/Fortran-features.h"
#include "flang/Parser/preprocessor.h"
#include "flang/Support/Fortran-features.h"
#include "llvm/Support/raw_ostream.h"
#include <optional>
#include <string>
Expand Down
2 changes: 1 addition & 1 deletion flang/include/flang/Parser/provenance.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "characters.h"
#include "source.h"
#include "flang/Common/idioms.h"
#include "flang/Common/interval.h"
#include "flang/Support/interval.h"
#include "llvm/Support/raw_ostream.h"
#include <cstddef>
#include <list>
Expand Down
2 changes: 1 addition & 1 deletion flang/include/flang/Parser/source.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// - A Unicode byte order mark is recognized if present.

#include "characters.h"
#include "flang/Common/reference.h"
#include "flang/Support/reference.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/raw_ostream.h"
#include <cstddef>
Expand Down
2 changes: 1 addition & 1 deletion flang/include/flang/Parser/user-state.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
// parse tree construction so as to avoid any need for representing
// state in static data.

#include "flang/Common/Fortran-features.h"
#include "flang/Common/idioms.h"
#include "flang/Parser/char-block.h"
#include "flang/Parser/parse-tree.h"
#include "flang/Support/Fortran-features.h"
#include "llvm/Support/raw_ostream.h"
#include <cinttypes>
#include <optional>
Expand Down
4 changes: 2 additions & 2 deletions flang/include/flang/Semantics/expression.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
#define FORTRAN_SEMANTICS_EXPRESSION_H_

#include "semantics.h"
#include "flang/Common/Fortran.h"
#include "flang/Common/indirection.h"
#include "flang/Common/restorer.h"
#include "flang/Common/visit.h"
#include "flang/Evaluate/characteristics.h"
Expand All @@ -24,6 +22,8 @@
#include "flang/Parser/parse-tree-visitor.h"
#include "flang/Parser/parse-tree.h"
#include "flang/Parser/tools.h"
#include "flang/Support/Fortran.h"
#include "flang/Support/indirection.h"
#include <map>
#include <optional>
#include <type_traits>
Expand Down
2 changes: 1 addition & 1 deletion flang/include/flang/Semantics/runtime-type-info.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
#ifndef FORTRAN_SEMANTICS_RUNTIME_TYPE_INFO_H_
#define FORTRAN_SEMANTICS_RUNTIME_TYPE_INFO_H_

#include "flang/Common/reference.h"
#include "flang/Semantics/symbol.h"
#include "flang/Support/reference.h"
#include <map>
#include <set>
#include <string>
Expand Down
4 changes: 2 additions & 2 deletions flang/include/flang/Semantics/scope.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

#include "attr.h"
#include "symbol.h"
#include "flang/Common/Fortran.h"
#include "flang/Common/idioms.h"
#include "flang/Common/reference.h"
#include "flang/Parser/message.h"
#include "flang/Parser/provenance.h"
#include "flang/Support/Fortran.h"
#include "flang/Support/reference.h"
#include <list>
#include <map>
#include <optional>
Expand Down
2 changes: 1 addition & 1 deletion flang/include/flang/Semantics/semantics.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@

#include "scope.h"
#include "symbol.h"
#include "flang/Common/Fortran-features.h"
#include "flang/Evaluate/common.h"
#include "flang/Evaluate/intrinsics.h"
#include "flang/Evaluate/target.h"
#include "flang/Parser/message.h"
#include "flang/Semantics/module-dependences.h"
#include "flang/Support/Fortran-features.h"
#include <iosfwd>
#include <set>
#include <string>
Expand Down
4 changes: 2 additions & 2 deletions flang/include/flang/Semantics/symbol.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
#define FORTRAN_SEMANTICS_SYMBOL_H_

#include "type.h"
#include "flang/Common/Fortran.h"
#include "flang/Common/enum-set.h"
#include "flang/Common/reference.h"
#include "flang/Common/visit.h"
#include "flang/Semantics/module-dependences.h"
#include "flang/Support/Fortran.h"
#include "flang/Support/reference.h"
#include "llvm/ADT/DenseMapInfo.h"

#include <array>
Expand Down
2 changes: 1 addition & 1 deletion flang/include/flang/Semantics/tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// Simple predicates and look-up functions that are best defined
// canonically for use in semantic checking.

#include "flang/Common/Fortran.h"
#include "flang/Common/visit.h"
#include "flang/Evaluate/expression.h"
#include "flang/Evaluate/shape.h"
Expand All @@ -23,6 +22,7 @@
#include "flang/Semantics/attr.h"
#include "flang/Semantics/expression.h"
#include "flang/Semantics/semantics.h"
#include "flang/Support/Fortran.h"
#include <functional>

namespace Fortran::semantics {
Expand Down
2 changes: 1 addition & 1 deletion flang/include/flang/Semantics/type.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
#ifndef FORTRAN_SEMANTICS_TYPE_H_
#define FORTRAN_SEMANTICS_TYPE_H_

#include "flang/Common/Fortran.h"
#include "flang/Common/idioms.h"
#include "flang/Evaluate/expression.h"
#include "flang/Parser/char-block.h"
#include "flang/Support/Fortran.h"
#include <algorithm>
#include <iosfwd>
#include <map>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- include/flang/Common/Fortran-features.h -----------------*- C++ -*-===//
//===-- include/flang/Support/Fortran-features.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.
Expand All @@ -9,9 +9,9 @@
#ifndef FORTRAN_COMMON_FORTRAN_FEATURES_H_
#define FORTRAN_COMMON_FORTRAN_FEATURES_H_

#include "flang/Common/Fortran.h"
#include "flang/Common/enum-set.h"
#include "flang/Common/idioms.h"
#include "flang/Support/Fortran.h"
#include <vector>

namespace Fortran::common {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
// Fortran language concepts that are used in many phases are defined
// once here to avoid redundancy and needless translation.

#include "enum-set.h"
#include "idioms.h"
#include "flang/Common/Fortran-consts.h"
#include "flang/Common/enum-set.h"
#include "flang/Common/idioms.h"
#include <cinttypes>
#include <optional>
#include <string>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===- MathOptionsBase.h - Math options config ------------------*- C++ -*-===//
//===-- include/flang/Support/MathOptionsBase.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.
Expand Down Expand Up @@ -27,16 +27,16 @@ class MathOptionsBase {
Name = static_cast<unsigned>(Value); \
return *this; \
}
#include "flang/Common/MathOptionsBase.def"
#include "flang/Support/MathOptionsBase.def"

MathOptionsBase() {
#define ENUM_MATHOPT(Name, Type, Bits, Default) set##Name(Default);
#include "flang/Common/MathOptionsBase.def"
#include "flang/Support/MathOptionsBase.def"
}

private:
#define ENUM_MATHOPT(Name, Type, Bits, Default) unsigned Name : Bits;
#include "flang/Common/MathOptionsBase.def"
#include "flang/Support/MathOptionsBase.def"
};

} // namespace Fortran::common
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- include/flang/Common/OpenMP-features.h -----------------*- C++ -*-====//
//===-- include/flang/Support/OpenMP-features.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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===- Version.h - Flang Version Number ---------------------*- Fortran -*-===//
//===-- include/flang/Support/Version.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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- include/flang/Common/default-kinds.h --------------------*- C++ -*-===//
//===-- include/flang/Support/default-kinds.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.
Expand All @@ -9,7 +9,7 @@
#ifndef FORTRAN_COMMON_DEFAULT_KINDS_H_
#define FORTRAN_COMMON_DEFAULT_KINDS_H_

#include "flang/Common/Fortran.h"
#include "flang/Support/Fortran.h"
#include <cstdint>

namespace Fortran::common {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- include/flang/Common/indirection.h ----------------------*- C++ -*-===//
//===-- include/flang/Support/indirection.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.
Expand All @@ -20,7 +20,7 @@
// template class Fortran::common::Indirection<FORWARD_TYPE>;
// in one C++ source file later where a definition of the type is visible.

#include "idioms.h"
#include "flang/Common/idioms.h"
#include <memory>
#include <type_traits>
#include <utility>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- include/flang/Common/interval.h -------------------------*- C++ -*-===//
//===-- include/flang/Support/interval.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.
Expand All @@ -12,7 +12,7 @@
// Defines a generalized template class Interval<A> to represent
// the half-open interval [x .. x+n).

#include "idioms.h"
#include "flang/Common/idioms.h"
#include <algorithm>
#include <cstddef>
#include <utility>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- include/flang/Common/reference-counted.h ----------------*- C++ -*-===//
//===-- include/flang/Support/reference-counted.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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- include/flang/Common/reference.h ------------------------*- C++ -*-===//
//===-- include/flang/Support/reference.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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- include/flang/Common/static-multimap-view.h -------------*- C++ -*-===//
//===-- include/flang/Support/static-multimap-view.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.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- include/flang/Common/template.h -------------------------*- C++ -*-===//
//===-- include/flang/Support/template.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.
Expand All @@ -9,8 +9,8 @@
#ifndef FORTRAN_COMMON_TEMPLATE_H_
#define FORTRAN_COMMON_TEMPLATE_H_

#include "variant.h"
#include "flang/Common/idioms.h"
#include "flang/Common/variant.h"
#include <functional>
#include <optional>
#include <tuple>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- include/flang/Common/unwrap.h ---------------------------*- C++ -*-===//
//===-- include/flang/Support/unwrap.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.
Expand All @@ -12,8 +12,8 @@
#include "indirection.h"
#include "reference-counted.h"
#include "reference.h"
#include "variant.h"
#include "visit.h"
#include "flang/Common/variant.h"
#include "flang/Common/visit.h"
#include <memory>
#include <optional>
#include <type_traits>
Expand Down
2 changes: 1 addition & 1 deletion flang/include/flang/Tools/CrossToolHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
#ifndef FORTRAN_TOOLS_CROSS_TOOL_HELPERS_H
#define FORTRAN_TOOLS_CROSS_TOOL_HELPERS_H

#include "flang/Common/MathOptionsBase.h"
#include "flang/Frontend/CodeGenOptions.h"
#include "flang/Frontend/LangOptions.h"
#include "flang/Support/MathOptionsBase.h"
#include <cstdint>

#include "mlir/Dialect/OpenMP/OpenMPDialect.h"
Expand Down
10 changes: 5 additions & 5 deletions flang/lib/Common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ endif()


add_flang_library(FortranCommon
Fortran.cpp
Fortran-features.cpp
default-kinds.cpp
idioms.cpp
Version.cpp
../Support/Fortran.cpp
../Support/Fortran-features.cpp
../Support/default-kinds.cpp
../Support/idioms.cpp
../Support/Version.cpp
${version_inc}

LINK_COMPONENTS
Expand Down
23 changes: 12 additions & 11 deletions flang/lib/Decimal/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
add_compile_definitions(FLANG_LITTLE_ENDIAN=1)
endif ()
include_directories(BEFORE
${FLANG_SOURCE_DIR}/include)
${FLANG_SOURCE_DIR}/include
${FLANG_SOURCE_DIR}/../FortranRuntime/include)
endif()

check_cxx_compiler_flag(-fno-lto FLANG_RUNTIME_HAS_FNO_LTO_FLAG)
Expand All @@ -50,8 +51,8 @@ endif()
add_definitions(-U_GLIBCXX_ASSERTIONS)

set(sources
binary-to-decimal.cpp
decimal-to-binary.cpp
../../../FortranRuntime/lib/Common/binary-to-decimal.cpp
../../../FortranRuntime/lib/Common/decimal-to-binary.cpp
)

include(AddFlangOffloadRuntime)
Expand All @@ -63,23 +64,23 @@ add_flang_library(FortranDecimal INSTALL_WITH_TOOLCHAIN ${sources})
if (DEFINED MSVC)
set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded)
add_flang_library(FortranDecimal.static INSTALL_WITH_TOOLCHAIN
binary-to-decimal.cpp
decimal-to-binary.cpp
../../../FortranRuntime/lib/Common/binary-to-decimal.cpp
../../../FortranRuntime/lib/Common/decimal-to-binary.cpp
)
set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreadedDLL)
add_flang_library(FortranDecimal.dynamic INSTALL_WITH_TOOLCHAIN
binary-to-decimal.cpp
decimal-to-binary.cpp
../../../FortranRuntime/lib/Common/binary-to-decimal.cpp
../../../FortranRuntime/lib/Common/decimal-to-binary.cpp
)
set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreadedDebug)
add_flang_library(FortranDecimal.static_dbg INSTALL_WITH_TOOLCHAIN
binary-to-decimal.cpp
decimal-to-binary.cpp
../../../FortranRuntime/lib/Common/binary-to-decimal.cpp
../../../FortranRuntime/lib/Common/decimal-to-binary.cpp
)
set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreadedDebugDLL)
add_flang_library(FortranDecimal.dynamic_dbg INSTALL_WITH_TOOLCHAIN
binary-to-decimal.cpp
decimal-to-binary.cpp
../../../FortranRuntime/lib/Common/binary-to-decimal.cpp
../../../FortranRuntime/lib/Common/decimal-to-binary.cpp
)
add_dependencies(FortranDecimal FortranDecimal.static FortranDecimal.dynamic
FortranDecimal.static_dbg FortranDecimal.dynamic_dbg)
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Evaluate/call.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
//===----------------------------------------------------------------------===//

#include "flang/Evaluate/call.h"
#include "flang/Common/Fortran.h"
#include "flang/Common/idioms.h"
#include "flang/Evaluate/characteristics.h"
#include "flang/Evaluate/check-expression.h"
#include "flang/Evaluate/expression.h"
#include "flang/Evaluate/tools.h"
#include "flang/Semantics/symbol.h"
#include "flang/Support/Fortran.h"

namespace Fortran::evaluate {

Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Evaluate/characteristics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//

#include "flang/Evaluate/characteristics.h"
#include "flang/Common/indirection.h"
#include "flang/Evaluate/check-expression.h"
#include "flang/Evaluate/fold.h"
#include "flang/Evaluate/intrinsics.h"
Expand All @@ -17,6 +16,7 @@
#include "flang/Semantics/scope.h"
#include "flang/Semantics/symbol.h"
#include "flang/Semantics/tools.h"
#include "flang/Support/indirection.h"
#include "llvm/Support/raw_ostream.h"
#include <initializer_list>

Expand Down
3 changes: 3 additions & 0 deletions flang/lib/Evaluate/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@

using namespace Fortran::parser::literals;



namespace Fortran::evaluate {


void RealFlagWarnings(
FoldingContext &context, const RealFlags &flags, const char *operation) {
if (context.languageFeatures().ShouldWarn(
Expand Down
6 changes: 3 additions & 3 deletions flang/lib/Evaluate/fold-implementation.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
#include "character.h"
#include "host.h"
#include "int-power.h"
#include "flang/Common/indirection.h"
#include "flang/Common/template.h"
#include "flang/Common/unwrap.h"
#include "flang/Evaluate/characteristics.h"
#include "flang/Evaluate/common.h"
#include "flang/Evaluate/constant.h"
Expand All @@ -31,6 +28,9 @@
#include "flang/Semantics/scope.h"
#include "flang/Semantics/symbol.h"
#include "flang/Semantics/tools.h"
#include "flang/Support/indirection.h"
#include "flang/Support/template.h"
#include "flang/Support/unwrap.h"
#include <algorithm>
#include <cmath>
#include <complex>
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Evaluate/formatting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//

#include "flang/Evaluate/formatting.h"
#include "flang/Common/Fortran.h"
#include "flang/Evaluate/call.h"
#include "flang/Evaluate/constant.h"
#include "flang/Evaluate/expression.h"
Expand All @@ -16,6 +15,7 @@
#include "flang/Parser/characters.h"
#include "flang/Semantics/semantics.h"
#include "flang/Semantics/symbol.h"
#include "flang/Support/Fortran.h"
#include "llvm/Support/raw_ostream.h"

namespace Fortran::evaluate {
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Evaluate/intrinsics-library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
#include "flang/Evaluate/intrinsics-library.h"
#include "fold-implementation.h"
#include "host.h"
#include "flang/Common/static-multimap-view.h"
#include "flang/Evaluate/expression.h"
#include "flang/Support/static-multimap-view.h"
#include <cfloat>
#include <cmath>
#include <complex>
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Evaluate/intrinsics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//

#include "flang/Evaluate/intrinsics.h"
#include "flang/Common/Fortran.h"
#include "flang/Common/enum-set.h"
#include "flang/Common/idioms.h"
#include "flang/Evaluate/check-expression.h"
Expand All @@ -19,6 +18,7 @@
#include "flang/Evaluate/type.h"
#include "flang/Semantics/scope.h"
#include "flang/Semantics/tools.h"
#include "flang/Support/Fortran.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cmath>
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Evaluate/real.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

#include "flang/Evaluate/real.h"
#include "int-power.h"
#include "flang/Common/decimal.h"
#include "flang/Common/idioms.h"
#include "flang/Decimal/decimal.h"
#include "flang/Parser/characters.h"
#include "llvm/Support/raw_ostream.h"
#include <limits>
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Evaluate/shape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

#include "flang/Evaluate/shape.h"
#include "flang/Common/idioms.h"
#include "flang/Common/template.h"
#include "flang/Evaluate/characteristics.h"
#include "flang/Evaluate/check-expression.h"
#include "flang/Evaluate/fold.h"
Expand All @@ -17,6 +16,7 @@
#include "flang/Evaluate/type.h"
#include "flang/Parser/message.h"
#include "flang/Semantics/symbol.h"
#include "flang/Support/template.h"
#include <functional>

using namespace std::placeholders; // _1, _2, &c. for std::bind()
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Evaluate/target.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
//===----------------------------------------------------------------------===//

#include "flang/Evaluate/target.h"
#include "flang/Common/template.h"
#include "flang/Evaluate/common.h"
#include "flang/Evaluate/type.h"
#include "flang/Support/template.h"

namespace Fortran::evaluate {

Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Frontend/CompilerInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
//===----------------------------------------------------------------------===//

#include "flang/Frontend/CompilerInstance.h"
#include "flang/Common/Fortran-features.h"
#include "flang/Frontend/CompilerInvocation.h"
#include "flang/Frontend/TextDiagnosticPrinter.h"
#include "flang/Parser/parsing.h"
#include "flang/Parser/provenance.h"
#include "flang/Semantics/semantics.h"
#include "flang/Support/Fortran-features.h"
#include "clang/Basic/DiagnosticFrontend.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/MC/TargetRegistry.h"
Expand Down
6 changes: 3 additions & 3 deletions flang/lib/Frontend/CompilerInvocation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
//===----------------------------------------------------------------------===//

#include "flang/Frontend/CompilerInvocation.h"
#include "flang/Common/Fortran-features.h"
#include "flang/Common/OpenMP-features.h"
#include "flang/Common/Version.h"
#include "flang/Frontend/CodeGenOptions.h"
#include "flang/Frontend/PreprocessorOptions.h"
#include "flang/Frontend/TargetOptions.h"
#include "flang/Semantics/semantics.h"
#include "flang/Support/Fortran-features.h"
#include "flang/Support/OpenMP-features.h"
#include "flang/Support/Version.h"
#include "flang/Tools/TargetSetup.h"
#include "flang/Version.inc"
#include "clang/Basic/AllDiagnostics.h"
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Frontend/FrontendActions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
//===----------------------------------------------------------------------===//

#include "flang/Frontend/FrontendActions.h"
#include "flang/Common/default-kinds.h"
#include "flang/Frontend/CompilerInstance.h"
#include "flang/Frontend/CompilerInvocation.h"
#include "flang/Frontend/FrontendOptions.h"
Expand All @@ -33,6 +32,7 @@
#include "flang/Semantics/runtime-type-info.h"
#include "flang/Semantics/semantics.h"
#include "flang/Semantics/unparse-with-symbols.h"
#include "flang/Support/default-kinds.h"
#include "flang/Tools/CrossToolHelpers.h"

#include "mlir/IR/Dialect.h"
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Lower/Bridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

#include "flang/Lower/Bridge.h"
#include "DirectivesCommon.h"
#include "flang/Common/Version.h"
#include "flang/Lower/Allocatable.h"
#include "flang/Lower/CallInterface.h"
#include "flang/Lower/Coarray.h"
Expand Down Expand Up @@ -59,6 +58,7 @@
#include "flang/Semantics/runtime-type-info.h"
#include "flang/Semantics/symbol.h"
#include "flang/Semantics/tools.h"
#include "flang/Support/Version.h"
#include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.h"
#include "mlir/IR/Matchers.h"
#include "mlir/IR/PatternMatch.h"
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Lower/CallInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//

#include "flang/Lower/CallInterface.h"
#include "flang/Common/Fortran.h"
#include "flang/Evaluate/fold.h"
#include "flang/Lower/Bridge.h"
#include "flang/Lower/Mangler.h"
Expand All @@ -23,6 +22,7 @@
#include "flang/Optimizer/Support/Utils.h"
#include "flang/Semantics/symbol.h"
#include "flang/Semantics/tools.h"
#include "flang/Support/Fortran.h"
#include <optional>

static mlir::FunctionType
Expand Down
4 changes: 2 additions & 2 deletions flang/lib/Lower/ConvertExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
//===----------------------------------------------------------------------===//

#include "flang/Lower/ConvertExpr.h"
#include "flang/Common/default-kinds.h"
#include "flang/Common/unwrap.h"
#include "flang/Evaluate/fold.h"
#include "flang/Evaluate/real.h"
#include "flang/Evaluate/traverse.h"
Expand Down Expand Up @@ -52,6 +50,8 @@
#include "flang/Semantics/symbol.h"
#include "flang/Semantics/tools.h"
#include "flang/Semantics/type.h"
#include "flang/Support/default-kinds.h"
#include "flang/Support/unwrap.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "llvm/ADT/TypeSwitch.h"
#include "llvm/Support/CommandLine.h"
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Lower/Mangler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
//===----------------------------------------------------------------------===//

#include "flang/Lower/Mangler.h"
#include "flang/Common/reference.h"
#include "flang/Lower/Support/Utils.h"
#include "flang/Optimizer/Builder/Todo.h"
#include "flang/Optimizer/Dialect/FIRType.h"
#include "flang/Optimizer/Support/InternalNames.h"
#include "flang/Semantics/tools.h"
#include "flang/Support/reference.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Optimizer/Builder/IntrinsicCall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
//===----------------------------------------------------------------------===//

#include "flang/Optimizer/Builder/IntrinsicCall.h"
#include "flang/Common/static-multimap-view.h"
#include "flang/Optimizer/Builder/BoxValue.h"
#include "flang/Optimizer/Builder/Character.h"
#include "flang/Optimizer/Builder/Complex.h"
Expand Down Expand Up @@ -42,6 +41,7 @@
#include "flang/Optimizer/Support/Utils.h"
#include "flang/Runtime/entry-names.h"
#include "flang/Runtime/iostat.h"
#include "flang/Support/static-multimap-view.h"
#include "mlir/Dialect/Complex/IR/Complex.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/Dialect/Math/IR/Math.h"
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Optimizer/CodeGen/TypeConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#define DEBUG_TYPE "flang-type-conversion"

#include "flang/Optimizer/CodeGen/TypeConverter.h"
#include "flang/Common/Fortran.h"
#include "flang/Optimizer/Builder/Todo.h" // remove when TODO's are done
#include "flang/Optimizer/CodeGen/DescriptorModel.h"
#include "flang/Optimizer/CodeGen/TBAABuilder.h"
Expand All @@ -22,6 +21,7 @@
#include "flang/Optimizer/Dialect/Support/FIRContext.h"
#include "flang/Optimizer/Dialect/Support/KindMapping.h"
#include "flang/Optimizer/Support/InternalNames.h"
#include "flang/Support/Fortran.h"
#include "mlir/Conversion/LLVMCommon/TypeConverter.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/Support/Debug.h"
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Optimizer/Dialect/FIRType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//===----------------------------------------------------------------------===//

#include "flang/Optimizer/Dialect/FIRType.h"
#include "flang/ISO_Fortran_binding_wrapper.h"
#include "flang/Common/ISO_Fortran_binding_wrapper.h"
#include "flang/Optimizer/Builder/Todo.h"
#include "flang/Optimizer/Dialect/FIRDialect.h"
#include "flang/Optimizer/Dialect/Support/KindMapping.h"
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Optimizer/Transforms/AddDebugInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
//===----------------------------------------------------------------------===//

#include "DebugTypeGenerator.h"
#include "flang/Common/Version.h"
#include "flang/Optimizer/Builder/FIRBuilder.h"
#include "flang/Optimizer/Builder/Todo.h"
#include "flang/Optimizer/CodeGen/CGOps.h"
Expand All @@ -22,6 +21,7 @@
#include "flang/Optimizer/Dialect/Support/FIRContext.h"
#include "flang/Optimizer/Support/InternalNames.h"
#include "flang/Optimizer/Transforms/Passes.h"
#include "flang/Support/Version.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/IR/Matchers.h"
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Optimizer/Transforms/AssumedRankOpConversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//

#include "flang/Common/Fortran.h"
#include "flang/Lower/BuiltinModules.h"
#include "flang/Optimizer/Builder/FIRBuilder.h"
#include "flang/Optimizer/Builder/Runtime/Support.h"
Expand All @@ -17,6 +16,7 @@
#include "flang/Optimizer/Support/Utils.h"
#include "flang/Optimizer/Transforms/Passes.h"
#include "flang/Runtime/support.h"
#include "flang/Support/Fortran.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Transforms/DialectConversion.h"
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Optimizer/Transforms/CufOpConversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//
//===----------------------------------------------------------------------===//

#include "flang/Common/Fortran.h"
#include "flang/Optimizer/Builder/Runtime/RTBuilder.h"
#include "flang/Optimizer/CodeGen/TypeConverter.h"
#include "flang/Optimizer/Dialect/CUF/CUFOps.h"
Expand All @@ -16,6 +15,7 @@
#include "flang/Optimizer/Support/DataLayout.h"
#include "flang/Runtime/CUDA/descriptor.h"
#include "flang/Runtime/allocatable.h"
#include "flang/Support/Fortran.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Transforms/DialectConversion.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Optimizer/Transforms/ExternalNameConversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
//
//===----------------------------------------------------------------------===//

#include "flang/Common/Fortran.h"
#include "flang/Optimizer/Dialect/FIRDialect.h"
#include "flang/Optimizer/Dialect/FIROps.h"
#include "flang/Optimizer/Dialect/FIROpsSupport.h"
#include "flang/Optimizer/Support/InternalNames.h"
#include "flang/Optimizer/Transforms/Passes.h"
#include "flang/Support/Fortran.h"
#include "mlir/IR/Attributes.h"
#include "mlir/IR/SymbolTable.h"
#include "mlir/Pass/Pass.h"
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Optimizer/Transforms/LoopVersioning.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
/// could be part of the cost analysis above.
//===----------------------------------------------------------------------===//

#include "flang/ISO_Fortran_binding_wrapper.h"
#include "flang/Common/ISO_Fortran_binding_wrapper.h"
#include "flang/Optimizer/Builder/BoxValue.h"
#include "flang/Optimizer/Builder/FIRBuilder.h"
#include "flang/Optimizer/Builder/Runtime/Inquiry.h"
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Optimizer/Transforms/SimplifyIntrinsics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
/// and small in size.
//===----------------------------------------------------------------------===//

#include "flang/Common/Fortran.h"
#include "flang/Optimizer/Builder/BoxValue.h"
#include "flang/Optimizer/Builder/FIRBuilder.h"
#include "flang/Optimizer/Builder/LowLevelIntrinsics.h"
Expand All @@ -34,6 +33,7 @@
#include "flang/Optimizer/Transforms/Passes.h"
#include "flang/Optimizer/Transforms/Utils.h"
#include "flang/Runtime/entry-names.h"
#include "flang/Support/Fortran.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/IR/Matchers.h"
#include "mlir/IR/Operation.h"
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Optimizer/Transforms/StackReclaim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
//
//===----------------------------------------------------------------------===//

#include "flang/Common/Fortran.h"
#include "flang/Optimizer/Dialect/FIRDialect.h"
#include "flang/Optimizer/Dialect/FIROps.h"
#include "flang/Optimizer/Transforms/Passes.h"
#include "flang/Support/Fortran.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/IR/Matchers.h"
#include "mlir/Pass/Pass.h"
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Optimizer/Transforms/VScaleAttr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/// likely harmless to run it on something else, but it is also not valuable].
//===----------------------------------------------------------------------===//

#include "flang/ISO_Fortran_binding_wrapper.h"
#include "flang/Common/ISO_Fortran_binding_wrapper.h"
#include "flang/Optimizer/Builder/BoxValue.h"
#include "flang/Optimizer/Builder/FIRBuilder.h"
#include "flang/Optimizer/Builder/Runtime/Inquiry.h"
Expand Down
4 changes: 2 additions & 2 deletions flang/lib/Parser/basic-parsers.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
// This header defines the fundamental parser class templates and helper
// template functions. See parser-combinators.txt for documentation.

#include "flang/Common/Fortran-features.h"
#include "flang/Common/idioms.h"
#include "flang/Common/indirection.h"
#include "flang/Parser/char-block.h"
#include "flang/Parser/message.h"
#include "flang/Parser/parse-state.h"
#include "flang/Parser/provenance.h"
#include "flang/Parser/user-state.h"
#include "flang/Support/Fortran-features.h"
#include "flang/Support/indirection.h"
#include <cstring>
#include <functional>
#include <list>
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Parser/parse-tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

#include "flang/Parser/parse-tree.h"
#include "flang/Common/idioms.h"
#include "flang/Common/indirection.h"
#include "flang/Parser/tools.h"
#include "flang/Parser/user-state.h"
#include "flang/Support/indirection.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>

Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Parser/prescan.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
// fixed form character literals on truncated card images, file
// inclusion, and driving the Fortran source preprocessor.

#include "flang/Common/Fortran-features.h"
#include "flang/Parser/characters.h"
#include "flang/Parser/message.h"
#include "flang/Parser/provenance.h"
#include "flang/Parser/token-sequence.h"
#include "flang/Support/Fortran-features.h"
#include <bitset>
#include <optional>
#include <string>
Expand Down
4 changes: 2 additions & 2 deletions flang/lib/Parser/unparse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
// traversal templates in parse-tree-visitor.h.

#include "flang/Parser/unparse.h"
#include "flang/Common/Fortran.h"
#include "flang/Common/idioms.h"
#include "flang/Common/indirection.h"
#include "flang/Parser/characters.h"
#include "flang/Parser/parse-tree-visitor.h"
#include "flang/Parser/parse-tree.h"
#include "flang/Parser/tools.h"
#include "flang/Support/Fortran.h"
#include "flang/Support/indirection.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cinttypes>
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Semantics/assignment.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
#ifndef FORTRAN_SEMANTICS_ASSIGNMENT_H_
#define FORTRAN_SEMANTICS_ASSIGNMENT_H_

#include "flang/Common/indirection.h"
#include "flang/Evaluate/expression.h"
#include "flang/Semantics/semantics.h"
#include "flang/Support/indirection.h"

namespace Fortran::parser {
class ContextualMessages;
Expand Down
4 changes: 2 additions & 2 deletions flang/lib/Semantics/check-case.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@

#include "check-case.h"
#include "flang/Common/idioms.h"
#include "flang/Common/reference.h"
#include "flang/Common/template.h"
#include "flang/Evaluate/fold.h"
#include "flang/Evaluate/type.h"
#include "flang/Parser/parse-tree.h"
#include "flang/Semantics/semantics.h"
#include "flang/Semantics/tools.h"
#include "flang/Support/reference.h"
#include "flang/Support/template.h"
#include <tuple>

namespace Fortran::semantics {
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Semantics/check-coarray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
//===----------------------------------------------------------------------===//

#include "check-coarray.h"
#include "flang/Common/indirection.h"
#include "flang/Evaluate/expression.h"
#include "flang/Parser/message.h"
#include "flang/Parser/parse-tree.h"
#include "flang/Parser/tools.h"
#include "flang/Semantics/expression.h"
#include "flang/Semantics/tools.h"
#include "flang/Support/indirection.h"

namespace Fortran::semantics {

Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Semantics/check-cuda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
//===----------------------------------------------------------------------===//

#include "check-cuda.h"
#include "flang/Common/template.h"
#include "flang/Evaluate/fold.h"
#include "flang/Evaluate/tools.h"
#include "flang/Evaluate/traverse.h"
Expand All @@ -17,6 +16,7 @@
#include "flang/Semantics/expression.h"
#include "flang/Semantics/symbol.h"
#include "flang/Semantics/tools.h"
#include "flang/Support/template.h"

// Once labeled DO constructs have been canonicalized and their parse subtrees
// transformed into parser::DoConstructs, scan the parser::Blocks of the program
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Semantics/check-data.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
#define FORTRAN_SEMANTICS_CHECK_DATA_H_

#include "data-to-inits.h"
#include "flang/Common/interval.h"
#include "flang/Evaluate/fold-designator.h"
#include "flang/Evaluate/initial-image.h"
#include "flang/Semantics/expression.h"
#include "flang/Semantics/semantics.h"
#include "flang/Support/interval.h"
#include <list>
#include <map>
#include <vector>
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Semantics/check-do-forall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

#include "check-do-forall.h"
#include "definable.h"
#include "flang/Common/template.h"
#include "flang/Evaluate/call.h"
#include "flang/Evaluate/expression.h"
#include "flang/Evaluate/tools.h"
Expand All @@ -22,6 +21,7 @@
#include "flang/Semantics/symbol.h"
#include "flang/Semantics/tools.h"
#include "flang/Semantics/type.h"
#include "flang/Support/template.h"

namespace Fortran::evaluate {
using ActualArgumentRef = common::Reference<const ActualArgument>;
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Semantics/check-return.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
//===----------------------------------------------------------------------===//

#include "check-return.h"
#include "flang/Common/Fortran-features.h"
#include "flang/Parser/message.h"
#include "flang/Parser/parse-tree.h"
#include "flang/Semantics/semantics.h"
#include "flang/Semantics/tools.h"
#include "flang/Support/Fortran-features.h"

namespace Fortran::semantics {

Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Semantics/check-select-rank.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
//===----------------------------------------------------------------------===//

#include "check-select-rank.h"
#include "flang/Common/Fortran.h"
#include "flang/Common/idioms.h"
#include "flang/Parser/message.h"
#include "flang/Parser/tools.h"
#include "flang/Semantics/tools.h"
#include "flang/Support/Fortran.h"
#include <list>
#include <optional>
#include <set>
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Semantics/check-select-type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

#include "check-select-type.h"
#include "flang/Common/idioms.h"
#include "flang/Common/reference.h"
#include "flang/Evaluate/fold.h"
#include "flang/Evaluate/type.h"
#include "flang/Parser/parse-tree.h"
#include "flang/Semantics/semantics.h"
#include "flang/Semantics/tools.h"
#include "flang/Support/reference.h"
#include <optional>

namespace Fortran::semantics {
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Semantics/check-stop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
//===----------------------------------------------------------------------===//

#include "check-stop.h"
#include "flang/Common/Fortran.h"
#include "flang/Evaluate/expression.h"
#include "flang/Parser/parse-tree.h"
#include "flang/Semantics/semantics.h"
#include "flang/Semantics/tools.h"
#include "flang/Support/Fortran.h"
#include <optional>

namespace Fortran::semantics {
Expand Down
4 changes: 2 additions & 2 deletions flang/lib/Semantics/data-to-inits.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
#ifndef FORTRAN_SEMANTICS_DATA_TO_INITS_H_
#define FORTRAN_SEMANTICS_DATA_TO_INITS_H_

#include "flang/Common/default-kinds.h"
#include "flang/Common/interval.h"
#include "flang/Evaluate/fold-designator.h"
#include "flang/Evaluate/initial-image.h"
#include "flang/Support/default-kinds.h"
#include "flang/Support/interval.h"
#include <list>
#include <map>

Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Semantics/expression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "pointer-assignment.h"
#include "resolve-names-utils.h"
#include "resolve-names.h"
#include "flang/Common/Fortran.h"
#include "flang/Common/idioms.h"
#include "flang/Evaluate/common.h"
#include "flang/Evaluate/fold.h"
Expand All @@ -24,6 +23,7 @@
#include "flang/Semantics/semantics.h"
#include "flang/Semantics/symbol.h"
#include "flang/Semantics/tools.h"
#include "flang/Support/Fortran.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <functional>
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Semantics/pointer-assignment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "definable.h"
#include "flang/Common/idioms.h"
#include "flang/Common/restorer.h"
#include "flang/Common/template.h"
#include "flang/Evaluate/characteristics.h"
#include "flang/Evaluate/expression.h"
#include "flang/Evaluate/fold.h"
Expand All @@ -21,6 +20,7 @@
#include "flang/Semantics/expression.h"
#include "flang/Semantics/symbol.h"
#include "flang/Semantics/tools.h"
#include "flang/Support/template.h"
#include "llvm/Support/raw_ostream.h"
#include <optional>
#include <set>
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Semantics/resolve-labels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

#include "resolve-labels.h"
#include "flang/Common/enum-set.h"
#include "flang/Common/template.h"
#include "flang/Parser/parse-tree-visitor.h"
#include "flang/Semantics/semantics.h"
#include "flang/Support/template.h"
#include <cstdarg>
#include <type_traits>

Expand Down
6 changes: 3 additions & 3 deletions flang/lib/Semantics/resolve-names-utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@
//===----------------------------------------------------------------------===//

#include "resolve-names-utils.h"
#include "flang/Common/Fortran-features.h"
#include "flang/Common/Fortran.h"
#include "flang/Common/idioms.h"
#include "flang/Common/indirection.h"
#include "flang/Evaluate/fold.h"
#include "flang/Evaluate/tools.h"
#include "flang/Evaluate/traverse.h"
Expand All @@ -20,6 +17,9 @@
#include "flang/Semantics/expression.h"
#include "flang/Semantics/semantics.h"
#include "flang/Semantics/tools.h"
#include "flang/Support/Fortran-features.h"
#include "flang/Support/Fortran.h"
#include "flang/Support/indirection.h"
#include <initializer_list>
#include <variant>

Expand Down
6 changes: 3 additions & 3 deletions flang/lib/Semantics/resolve-names.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
#include "resolve-directives.h"
#include "resolve-names-utils.h"
#include "rewrite-parse-tree.h"
#include "flang/Common/Fortran.h"
#include "flang/Common/default-kinds.h"
#include "flang/Common/indirection.h"
#include "flang/Common/restorer.h"
#include "flang/Common/visit.h"
#include "flang/Evaluate/characteristics.h"
Expand All @@ -37,6 +34,9 @@
#include "flang/Semantics/symbol.h"
#include "flang/Semantics/tools.h"
#include "flang/Semantics/type.h"
#include "flang/Support/Fortran.h"
#include "flang/Support/default-kinds.h"
#include "flang/Support/indirection.h"
#include "llvm/Support/raw_ostream.h"
#include <list>
#include <map>
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Semantics/rewrite-parse-tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@

#include "rewrite-parse-tree.h"
#include "rewrite-directives.h"
#include "flang/Common/indirection.h"
#include "flang/Parser/parse-tree-visitor.h"
#include "flang/Parser/parse-tree.h"
#include "flang/Parser/tools.h"
#include "flang/Semantics/scope.h"
#include "flang/Semantics/semantics.h"
#include "flang/Semantics/symbol.h"
#include "flang/Semantics/tools.h"
#include "flang/Support/indirection.h"
#include <list>

namespace Fortran::semantics {
Expand Down
2 changes: 1 addition & 1 deletion flang/lib/Semantics/semantics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
#include "resolve-labels.h"
#include "resolve-names.h"
#include "rewrite-parse-tree.h"
#include "flang/Common/default-kinds.h"
#include "flang/Parser/parse-tree-visitor.h"
#include "flang/Parser/tools.h"
#include "flang/Semantics/expression.h"
#include "flang/Semantics/scope.h"
#include "flang/Semantics/symbol.h"
#include "flang/Support/default-kinds.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/TargetParser/Host.h"
#include "llvm/TargetParser/Triple.h"
Expand Down
4 changes: 2 additions & 2 deletions flang/lib/Semantics/tools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
//===----------------------------------------------------------------------===//

#include "flang/Parser/tools.h"
#include "flang/Common/Fortran.h"
#include "flang/Common/indirection.h"
#include "flang/Parser/dump-parse-tree.h"
#include "flang/Parser/message.h"
#include "flang/Parser/parse-tree.h"
Expand All @@ -17,6 +15,8 @@
#include "flang/Semantics/symbol.h"
#include "flang/Semantics/tools.h"
#include "flang/Semantics/type.h"
#include "flang/Support/Fortran.h"
#include "flang/Support/indirection.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <set>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
//===-- lib/Common/Fortran-features.cpp -----------------------------------===//
//===-- lib/Support/Fortran-features.cpp ------------------------*- 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
//
//===----------------------------------------------------------------------===//

#include "flang/Common/Fortran-features.h"
#include "flang/Common/Fortran.h"
#include "flang/Support/Fortran-features.h"
#include "flang/Common/idioms.h"
#include "flang/Support/Fortran.h"

namespace Fortran::common {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
//===-- lib/Common/Fortran.cpp --------------------------------------------===//
//===-- lib/Support/Fortran.cpp ---------------------------------*- 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
//
//===----------------------------------------------------------------------===//

#include "flang/Common/Fortran.h"
#include "flang/Common/Fortran-features.h"
#include "flang/Support/Fortran.h"
#include "flang/Support/Fortran-features.h"

namespace Fortran::common {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===- Version.cpp - Flang Version Number -------------------*- Fortran -*-===//
//===-- lib/Support/Version.cpp ---------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
Expand All @@ -10,7 +10,7 @@
//
//===----------------------------------------------------------------------===//

#include "flang/Common/Version.h"
#include "flang/Support/Version.h"
#include "llvm/Support/raw_ostream.h"
#include <cstdlib>
#include <cstring>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
//===-- lib/Common/default-kinds.cpp --------------------------------------===//
//===-- lib/Support/default-kinds.cpp ---------------------------*- 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
//
//===----------------------------------------------------------------------===//

#include "flang/Common/default-kinds.h"
#include "flang/Support/default-kinds.h"
#include "flang/Common/idioms.h"

namespace Fortran::common {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//===-- lib/Common/idioms.cpp ---------------------------------------------===//
//===-- lib/Support/idioms.cpp ----------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
Expand Down
2 changes: 1 addition & 1 deletion flang/test/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
if config.cc:
libruntime = os.path.join(config.flang_lib_dir, "libFortranRuntime.a")
libdecimal = os.path.join(config.flang_lib_dir, "libFortranDecimal.a")
include = os.path.join(config.flang_src_dir, "include")
include = os.path.join(config.flang_src_dir, "..", "FortranRuntime", "include")

if (
os.path.isfile(libruntime)
Expand Down
8 changes: 4 additions & 4 deletions flang/tools/bbc/bbc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
///
//===----------------------------------------------------------------------===//

#include "flang/Common/Fortran-features.h"
#include "flang/Common/OpenMP-features.h"
#include "flang/Common/Version.h"
#include "flang/Common/default-kinds.h"
#include "flang/Frontend/TargetOptions.h"
#include "flang/Lower/Bridge.h"
#include "flang/Lower/PFTBuilder.h"
Expand All @@ -40,6 +36,10 @@
#include "flang/Semantics/runtime-type-info.h"
#include "flang/Semantics/semantics.h"
#include "flang/Semantics/unparse-with-symbols.h"
#include "flang/Support/Fortran-features.h"
#include "flang/Support/OpenMP-features.h"
#include "flang/Support/Version.h"
#include "flang/Support/default-kinds.h"
#include "flang/Tools/CrossToolHelpers.h"
#include "flang/Tools/TargetSetup.h"
#include "flang/Version.inc"
Expand Down
4 changes: 2 additions & 2 deletions flang/tools/f18-parse-demo/f18-parse-demo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
// scaffolding compiler driver that can test some semantic passes of the
// F18 compiler under development.

#include "flang/Common/Fortran-features.h"
#include "flang/Common/default-kinds.h"
#include "flang/Parser/characters.h"
#include "flang/Parser/dump-parse-tree.h"
#include "flang/Parser/message.h"
Expand All @@ -31,6 +29,8 @@
#include "flang/Parser/parsing.h"
#include "flang/Parser/provenance.h"
#include "flang/Parser/unparse.h"
#include "flang/Support/Fortran-features.h"
#include "flang/Support/default-kinds.h"
#include "llvm/Support/Errno.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Program.h"
Expand Down
6 changes: 4 additions & 2 deletions flang/tools/f18/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,19 +105,21 @@ if (NOT CMAKE_CROSSCOMPILING)
set(compile_with "-fsyntax-only")
set(object_output "")
set(include_in_link FALSE)
set(fullpath "${FLANG_SOURCE_DIR}/../FortranRuntime/module/${filename}.f90")
if(${filename} IN_LIST MODULES_WITH_IMPLEMENTATION)
set(object_output "${CMAKE_CURRENT_BINARY_DIR}/${filename}${CMAKE_CXX_OUTPUT_EXTENSION}")
set(compile_with -c -o ${object_output})
set(include_in_link TRUE)
set(fullpath "${FLANG_SOURCE_DIR}/../FortranRuntime/lib/Runtime/${filename}.f90")
endif()

set(base ${FLANG_INTRINSIC_MODULES_DIR}/${filename})
# TODO: We may need to flag this with conditional, in case Flang is built w/o OpenMP support
add_custom_command(OUTPUT ${base}.mod ${object_output}
COMMAND ${CMAKE_COMMAND} -E make_directory ${FLANG_INTRINSIC_MODULES_DIR}
COMMAND flang-new ${opts} ${decls} -cpp ${compile_with} -module-dir ${FLANG_INTRINSIC_MODULES_DIR}
${FLANG_SOURCE_DIR}/module/${filename}.f90
DEPENDS flang-new ${FLANG_SOURCE_DIR}/module/${filename}.f90 ${FLANG_SOURCE_DIR}/module/__fortran_builtins.f90 ${depends}
${fullpath}
DEPENDS flang-new ${fullpath} ${FLANG_SOURCE_DIR}/../FortranRuntime/module/__fortran_builtins.f90 ${depends}
)
list(APPEND MODULE_FILES ${base}.mod)
install(FILES ${base}.mod DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/flang")
Expand Down
6 changes: 3 additions & 3 deletions flang/unittests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ function(add_flang_nongtest_unittest test_name)
endfunction()

add_subdirectory(Optimizer)
add_subdirectory(Common)
add_subdirectory(Decimal)
add_subdirectory(../../FortranRuntime/unittests/Common Common)
add_subdirectory(../../FortranRuntime/unittests/Decimal Decimal)
add_subdirectory(Evaluate)
add_subdirectory(Runtime)
add_subdirectory(../../FortranRuntime/unittests/Runtime Runtime)
add_subdirectory(Frontend)
20 changes: 4 additions & 16 deletions flang/unittests/Evaluate/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
add_library(FortranEvaluateTesting
testing.cpp
fp-testing.cpp
../../../FortranRuntime/lib/Testing/testing.cpp
../../../FortranRuntime/lib/Testing/fp-testing.cpp
)
set_target_properties(FortranEvaluateTesting PROPERTIES FOLDER "Flang/Tests")
if (LLVM_LINK_LLVM_DYLIB)
Expand Down Expand Up @@ -69,23 +69,11 @@ add_flang_nongtest_unittest(real
)
llvm_update_compile_flags(real.test)

add_flang_nongtest_unittest(reshape
FortranEvaluateTesting
FortranSemantics
FortranEvaluate
FortranRuntime
)

add_flang_nongtest_unittest(ISO-Fortran-binding
FortranEvaluateTesting
FortranEvaluate
FortranSemantics
FortranRuntime
)

add_flang_nongtest_unittest(folding
FortranCommon
FortranEvaluateTesting
FortranEvaluate
FortranSemantics
)

add_subdirectory(../../../FortranRuntime/unittests/Evaluate runtime)
2 changes: 1 addition & 1 deletion flang/unittests/Evaluate/bit-population-count.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "flang/Common/bit-population-count.h"
#include "testing.h"
#include "flang/Testing/testing.h"

using Fortran::common::BitPopulationCount;
using Fortran::common::Parity;
Expand Down
2 changes: 1 addition & 1 deletion flang/unittests/Evaluate/expression.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#include "flang/Evaluate/expression.h"
#include "testing.h"
#include "flang/Evaluate/fold.h"
#include "flang/Evaluate/intrinsics.h"
#include "flang/Evaluate/target.h"
#include "flang/Evaluate/tools.h"
#include "flang/Parser/message.h"
#include "flang/Testing/testing.h"
#include <cstdio>
#include <cstdlib>
#include <string>
Expand Down
2 changes: 1 addition & 1 deletion flang/unittests/Evaluate/folding.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#include "testing.h"
#include "../../lib/Evaluate/host.h"
#include "flang/Evaluate/call.h"
#include "flang/Evaluate/expression.h"
Expand All @@ -7,6 +6,7 @@
#include "flang/Evaluate/intrinsics.h"
#include "flang/Evaluate/target.h"
#include "flang/Evaluate/tools.h"
#include "flang/Testing/testing.h"
#include <tuple>

using namespace Fortran::evaluate;
Expand Down
2 changes: 1 addition & 1 deletion flang/unittests/Evaluate/integer.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "flang/Evaluate/integer.h"
#include "testing.h"
#include "flang/Testing/testing.h"
#include <cstdio>
#include <string>

Expand Down
2 changes: 1 addition & 1 deletion flang/unittests/Evaluate/intrinsics.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#include "flang/Evaluate/intrinsics.h"
#include "testing.h"
#include "flang/Evaluate/common.h"
#include "flang/Evaluate/expression.h"
#include "flang/Evaluate/target.h"
#include "flang/Evaluate/tools.h"
#include "flang/Parser/provenance.h"
#include "flang/Testing/testing.h"
#include "llvm/Support/raw_ostream.h"
#include <initializer_list>
#include <map>
Expand Down
2 changes: 1 addition & 1 deletion flang/unittests/Evaluate/leading-zero-bit-count.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "flang/Common/leading-zero-bit-count.h"
#include "testing.h"
#include "flang/Testing/testing.h"

using Fortran::common::LeadingZeroBitCount;

Expand Down
2 changes: 1 addition & 1 deletion flang/unittests/Evaluate/logical.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "testing.h"
#include "flang/Evaluate/type.h"
#include "flang/Testing/testing.h"
#include <cstdio>

template <int KIND> void testKind() {
Expand Down
4 changes: 2 additions & 2 deletions flang/unittests/Evaluate/real.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "fp-testing.h"
#include "testing.h"
#include "flang/Evaluate/type.h"
#include "flang/Testing/fp-testing.h"
#include "flang/Testing/testing.h"
#include "llvm/Support/raw_ostream.h"
#include <cmath>
#include <cstdio>
Expand Down
2 changes: 1 addition & 1 deletion flang/unittests/Evaluate/uint128.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#define AVOID_NATIVE_UINT128_T 1
#include "flang/Common/uint128.h"
#include "testing.h"
#include "flang/Testing/testing.h"
#include "llvm/Support/raw_ostream.h"
#include <cinttypes>

Expand Down