diff --git a/flang/examples/external-hello.cpp b/flang/examples/external-hello.cpp --- a/flang/examples/external-hello.cpp +++ b/flang/examples/external-hello.cpp @@ -1,6 +1,6 @@ -#include "../runtime/io-api.h" -#include "../runtime/main.h" -#include "../runtime/stop.h" +#include "flang/Runtime/io-api.h" +#include "flang/Runtime/main.h" +#include "flang/Runtime/stop.h" #include #include diff --git a/flang/runtime/pgmath.h.inc b/flang/include/flang/Evaluate/pgmath.h.inc rename from flang/runtime/pgmath.h.inc rename to flang/include/flang/Evaluate/pgmath.h.inc --- a/flang/runtime/pgmath.h.inc +++ b/flang/include/flang/Evaluate/pgmath.h.inc @@ -1,4 +1,4 @@ -//===-- runtime/pgmath.h.inc -------------------------------===// +//===-- include/flang/Evaluate/pgmath.h.inc -------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/flang/runtime/allocatable.h b/flang/include/flang/Runtime/allocatable.h rename from flang/runtime/allocatable.h rename to flang/include/flang/Runtime/allocatable.h --- a/flang/runtime/allocatable.h +++ b/flang/include/flang/Runtime/allocatable.h @@ -1,4 +1,4 @@ -//===-- runtime/allocatable.h -----------------------------------*- C++ -*-===// +//===-- include/flang/Runtime/allocatable.h ---------------- // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -11,8 +11,8 @@ #ifndef FORTRAN_RUNTIME_ALLOCATABLE_H_ #define FORTRAN_RUNTIME_ALLOCATABLE_H_ -#include "descriptor.h" -#include "entry-names.h" +#include "flang/Runtime/descriptor.h" +#include "flang/Runtime/entry-names.h" namespace Fortran::runtime { diff --git a/flang/runtime/assign.h b/flang/include/flang/Runtime/assign.h rename from flang/runtime/assign.h rename to flang/include/flang/Runtime/assign.h --- a/flang/runtime/assign.h +++ b/flang/include/flang/Runtime/assign.h @@ -1,4 +1,4 @@ -//===-- runtime/assign.h --------------------------------------------------===// +//===-- include/flang/Runtime/assign.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. @@ -20,10 +20,10 @@ // need not be handled here in the runtime; ditto for type conversions on // intrinsic assignments. -#ifndef FLANG_RUNTIME_ASSIGN_H_ -#define FLANG_RUNTIME_ASSIGN_H_ +#ifndef FORTRAN_RUNTIME_ASSIGN_H_ +#define FORTRAN_RUNTIME_ASSIGN_H_ -#include "entry-names.h" +#include "flang/Runtime/entry-names.h" namespace Fortran::runtime { class Descriptor; @@ -42,4 +42,4 @@ const char *sourceFile = nullptr, int sourceLine = 0); } // extern "C" } // namespace Fortran::runtime -#endif // FLANG_RUNTIME_ASSIGN_H_ +#endif // FORTRAN_RUNTIME_ASSIGN_H_ diff --git a/flang/runtime/c-or-cpp.h b/flang/include/flang/Runtime/c-or-cpp.h rename from flang/runtime/c-or-cpp.h rename to flang/include/flang/Runtime/c-or-cpp.h --- a/flang/runtime/c-or-cpp.h +++ b/flang/include/flang/Runtime/c-or-cpp.h @@ -1,4 +1,4 @@ -//===-- runtime/c-or-cpp.h --------------------------------------*- C++ -*-===// +//===-- include/flang/Runtime/c-or-cpp.h ------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/flang/runtime/character.h b/flang/include/flang/Runtime/character.h rename from flang/runtime/character.h rename to flang/include/flang/Runtime/character.h --- a/flang/runtime/character.h +++ b/flang/include/flang/Runtime/character.h @@ -1,4 +1,4 @@ -//===-- runtime/character.h -------------------------------------*- C++ -*-===// +//===-- include/flang/Runtime/character.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. @@ -11,7 +11,7 @@ #ifndef FORTRAN_RUNTIME_CHARACTER_H_ #define FORTRAN_RUNTIME_CHARACTER_H_ -#include "entry-names.h" +#include "flang/Runtime/entry-names.h" #include namespace Fortran::runtime { diff --git a/flang/runtime/command.h b/flang/include/flang/Runtime/command.h rename from flang/runtime/command.h rename to flang/include/flang/Runtime/command.h --- a/flang/runtime/command.h +++ b/flang/include/flang/Runtime/command.h @@ -1,4 +1,4 @@ -//===-- runtime/command.h ---------------------------------------*- C++ -*-===// +//===-- include/flang/Runtime/command.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. @@ -9,8 +9,8 @@ #ifndef FORTRAN_RUNTIME_COMMAND_H_ #define FORTRAN_RUNTIME_COMMAND_H_ -#include "cpp-type.h" -#include "entry-names.h" +#include "flang/Runtime/cpp-type.h" +#include "flang/Runtime/entry-names.h" namespace Fortran::runtime { class Descriptor; diff --git a/flang/runtime/cpp-type.h b/flang/include/flang/Runtime/cpp-type.h rename from flang/runtime/cpp-type.h rename to flang/include/flang/Runtime/cpp-type.h --- a/flang/runtime/cpp-type.h +++ b/flang/include/flang/Runtime/cpp-type.h @@ -1,4 +1,4 @@ -//===-- runtime/cpp-type.h --------------------------------------*- C++ -*-===// +//===-- include/flang/Runtime/cpp-type.h ------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/flang/runtime/derived-api.h b/flang/include/flang/Runtime/derived-api.h rename from flang/runtime/derived-api.h rename to flang/include/flang/Runtime/derived-api.h --- a/flang/runtime/derived-api.h +++ b/flang/include/flang/Runtime/derived-api.h @@ -1,4 +1,4 @@ -//===-- runtime/derived-api.h ---------------------------------------------===// +//===-- include/flang/Runtime/derived-api.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. @@ -12,10 +12,10 @@ // local variables. Whole allocatable assignment should use AllocatableAssign() // instead of this Assign(). -#ifndef FLANG_RUNTIME_DERIVED_API_H_ -#define FLANG_RUNTIME_DERIVED_API_H_ +#ifndef FORTRAN_RUNTIME_DERIVED_API_H_ +#define FORTRAN_RUNTIME_DERIVED_API_H_ -#include "entry-names.h" +#include "flang/Runtime/entry-names.h" namespace Fortran::runtime { class Descriptor; @@ -40,4 +40,4 @@ } // extern "C" } // namespace Fortran::runtime -#endif // FLANG_RUNTIME_DERIVED_API_H_ +#endif // FORTRAN_RUNTIME_DERIVED_API_H_ diff --git a/flang/runtime/descriptor.h b/flang/include/flang/Runtime/descriptor.h rename from flang/runtime/descriptor.h rename to flang/include/flang/Runtime/descriptor.h --- a/flang/runtime/descriptor.h +++ b/flang/include/flang/Runtime/descriptor.h @@ -1,4 +1,4 @@ -//===-- runtime/descriptor.h ------------------------------------*- C++ -*-===// +//===-- include/flang/Runtime/descriptor.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. @@ -18,9 +18,9 @@ // User C code is welcome to depend on that ISO_Fortran_binding.h file, // but should never reference this internal header. -#include "memory.h" -#include "type-code.h" #include "flang/ISO_Fortran_binding.h" +#include "flang/Runtime/memory.h" +#include "flang/Runtime/type-code.h" #include #include #include diff --git a/flang/runtime/entry-names.h b/flang/include/flang/Runtime/entry-names.h rename from flang/runtime/entry-names.h rename to flang/include/flang/Runtime/entry-names.h --- a/flang/runtime/entry-names.h +++ b/flang/include/flang/Runtime/entry-names.h @@ -1,4 +1,4 @@ -/*===-- runtime/entry-names.h ---------------------------------------*- C -*-=== +/*===-- include/flang/Runtime/entry-names.h -------------------------*- C -*-=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. diff --git a/flang/runtime/io-api.h b/flang/include/flang/Runtime/io-api.h rename from flang/runtime/io-api.h rename to flang/include/flang/Runtime/io-api.h --- a/flang/runtime/io-api.h +++ b/flang/include/flang/Runtime/io-api.h @@ -1,4 +1,4 @@ -//===-- runtime/io-api.h ----------------------------------------*- C++ -*-===// +//===-- include/flang/Runtime/io-api.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. @@ -11,8 +11,8 @@ #ifndef FORTRAN_RUNTIME_IO_API_H_ #define FORTRAN_RUNTIME_IO_API_H_ -#include "entry-names.h" -#include "iostat.h" +#include "flang/Runtime/entry-names.h" +#include "flang/Runtime/iostat.h" #include #include diff --git a/flang/runtime/iostat.h b/flang/include/flang/Runtime/iostat.h rename from flang/runtime/iostat.h rename to flang/include/flang/Runtime/iostat.h --- a/flang/runtime/iostat.h +++ b/flang/include/flang/Runtime/iostat.h @@ -1,4 +1,4 @@ -//===-- runtime/iostat.h ----------------------------------------*- C++ -*-===// +//===-- include/flang/Runtime/iostat.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. @@ -11,7 +11,7 @@ #ifndef FORTRAN_RUNTIME_IOSTAT_H_ #define FORTRAN_RUNTIME_IOSTAT_H_ -#include "magic-numbers.h" +#include "flang/Runtime/magic-numbers.h" namespace Fortran::runtime::io { // The value of IOSTAT= is zero when no error, end-of-record, diff --git a/flang/runtime/magic-numbers.h b/flang/include/flang/Runtime/magic-numbers.h rename from flang/runtime/magic-numbers.h rename to flang/include/flang/Runtime/magic-numbers.h --- a/flang/runtime/magic-numbers.h +++ b/flang/include/flang/Runtime/magic-numbers.h @@ -1,10 +1,11 @@ -#if 0 /*===-- runtime/magic-numbers.h -----------------------------------===*/ +#if 0 /*===-- include/flang/Runtime/magic-numbers.h \ + -----------------------===*/ /* * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception * - *===--------------------------------------------------------------------===*/ + *===----------------------------------------------------------------------===*/ #endif #if 0 This header can be included into both Fortran and C. diff --git a/flang/runtime/main.h b/flang/include/flang/Runtime/main.h rename from flang/runtime/main.h rename to flang/include/flang/Runtime/main.h --- a/flang/runtime/main.h +++ b/flang/include/flang/Runtime/main.h @@ -1,4 +1,4 @@ -//===-- runtime/main.h ------------------------------------------*- C++ -*-===// +//===-- include/flang/Runtime/main.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. @@ -9,8 +9,8 @@ #ifndef FORTRAN_RUNTIME_MAIN_H_ #define FORTRAN_RUNTIME_MAIN_H_ -#include "c-or-cpp.h" -#include "entry-names.h" +#include "flang/Runtime/c-or-cpp.h" +#include "flang/Runtime/entry-names.h" FORTRAN_EXTERN_C_BEGIN void RTNAME(ProgramStart)(int, const char *[], const char *[]); diff --git a/flang/runtime/matmul.h b/flang/include/flang/Runtime/matmul.h rename from flang/runtime/matmul.h rename to flang/include/flang/Runtime/matmul.h --- a/flang/runtime/matmul.h +++ b/flang/include/flang/Runtime/matmul.h @@ -1,4 +1,4 @@ -//===-- runtime/matmul.h ----------------------------------------*- C++ -*-===// +//===-- include/flang/Runtime/matmul.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. @@ -10,7 +10,7 @@ #ifndef FORTRAN_RUNTIME_MATMUL_H_ #define FORTRAN_RUNTIME_MATMUL_H_ -#include "entry-names.h" +#include "flang/Runtime/entry-names.h" namespace Fortran::runtime { class Descriptor; extern "C" { diff --git a/flang/runtime/memory.h b/flang/include/flang/Runtime/memory.h rename from flang/runtime/memory.h rename to flang/include/flang/Runtime/memory.h --- a/flang/runtime/memory.h +++ b/flang/include/flang/Runtime/memory.h @@ -1,4 +1,4 @@ -//===-- runtime/memory.h ----------------------------------------*- C++ -*-===// +//===-- include/flang/Runtime/memory.h --------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/flang/runtime/misc-intrinsic.h b/flang/include/flang/Runtime/misc-intrinsic.h rename from flang/runtime/misc-intrinsic.h rename to flang/include/flang/Runtime/misc-intrinsic.h --- a/flang/runtime/misc-intrinsic.h +++ b/flang/include/flang/Runtime/misc-intrinsic.h @@ -1,4 +1,4 @@ -//===-- runtime/misc-intrinsic.h --------------------------------*- C++ -*-===// +//===-- include/flang/Runtime/misc-intrinsic.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. @@ -11,7 +11,7 @@ #ifndef FORTRAN_RUNTIME_MISC_INTRINSIC_H_ #define FORTRAN_RUNTIME_MISC_INTRINSIC_H_ -#include "entry-names.h" +#include "flang/Runtime/entry-names.h" #include namespace Fortran::runtime { diff --git a/flang/runtime/numeric.h b/flang/include/flang/Runtime/numeric.h rename from flang/runtime/numeric.h rename to flang/include/flang/Runtime/numeric.h --- a/flang/runtime/numeric.h +++ b/flang/include/flang/Runtime/numeric.h @@ -1,4 +1,4 @@ -//===-- runtime/numeric.h ---------------------------------------*- C++ -*-===// +//===-- include/flang/Runtime/numeric.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. @@ -12,8 +12,8 @@ #ifndef FORTRAN_RUNTIME_NUMERIC_H_ #define FORTRAN_RUNTIME_NUMERIC_H_ -#include "cpp-type.h" -#include "entry-names.h" +#include "flang/Runtime/cpp-type.h" +#include "flang/Runtime/entry-names.h" namespace Fortran::runtime { extern "C" { diff --git a/flang/runtime/pointer.h b/flang/include/flang/Runtime/pointer.h rename from flang/runtime/pointer.h rename to flang/include/flang/Runtime/pointer.h --- a/flang/runtime/pointer.h +++ b/flang/include/flang/Runtime/pointer.h @@ -1,4 +1,4 @@ -//===-- runtime/pointer.h ---------------------------------------*- C++ -*-===// +//===-- include/flang/Runtime/pointer.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. @@ -12,8 +12,8 @@ #ifndef FORTRAN_RUNTIME_POINTER_H_ #define FORTRAN_RUNTIME_POINTER_H_ -#include "descriptor.h" -#include "entry-names.h" +#include "flang/Runtime/descriptor.h" +#include "flang/Runtime/entry-names.h" namespace Fortran::runtime { extern "C" { diff --git a/flang/runtime/random.h b/flang/include/flang/Runtime/random.h rename from flang/runtime/random.h rename to flang/include/flang/Runtime/random.h --- a/flang/runtime/random.h +++ b/flang/include/flang/Runtime/random.h @@ -1,4 +1,4 @@ -//===-- runtime/random.h --------------------------------------------------===// +//===-- include/flang/Runtime/random.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. @@ -8,7 +8,7 @@ // Intrinsic subroutines RANDOM_INIT, RANDOM_NUMBER, and RANDOM_SEED. -#include "entry-names.h" +#include "flang/Runtime/entry-names.h" #include namespace Fortran::runtime { diff --git a/flang/runtime/reduction.h b/flang/include/flang/Runtime/reduction.h rename from flang/runtime/reduction.h rename to flang/include/flang/Runtime/reduction.h --- a/flang/runtime/reduction.h +++ b/flang/include/flang/Runtime/reduction.h @@ -1,4 +1,4 @@ -//===-- runtime/reduction.h -------------------------------------*- C++ -*-===// +//===-- include/flang/Runtime/reduction.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. @@ -11,9 +11,9 @@ #ifndef FORTRAN_RUNTIME_REDUCTION_H_ #define FORTRAN_RUNTIME_REDUCTION_H_ -#include "descriptor.h" -#include "entry-names.h" #include "flang/Common/uint128.h" +#include "flang/Runtime/descriptor.h" +#include "flang/Runtime/entry-names.h" #include #include diff --git a/flang/runtime/stop.h b/flang/include/flang/Runtime/stop.h rename from flang/runtime/stop.h rename to flang/include/flang/Runtime/stop.h --- a/flang/runtime/stop.h +++ b/flang/include/flang/Runtime/stop.h @@ -1,4 +1,4 @@ -//===-- runtime/stop.h ------------------------------------------*- C++ -*-===// +//===-- include/flang/Runtime/stop.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. @@ -9,8 +9,8 @@ #ifndef FORTRAN_RUNTIME_STOP_H_ #define FORTRAN_RUNTIME_STOP_H_ -#include "c-or-cpp.h" -#include "entry-names.h" +#include "flang/Runtime/c-or-cpp.h" +#include "flang/Runtime/entry-names.h" #include FORTRAN_EXTERN_C_BEGIN diff --git a/flang/runtime/time-intrinsic.h b/flang/include/flang/Runtime/time-intrinsic.h rename from flang/runtime/time-intrinsic.h rename to flang/include/flang/Runtime/time-intrinsic.h --- a/flang/runtime/time-intrinsic.h +++ b/flang/include/flang/Runtime/time-intrinsic.h @@ -1,4 +1,4 @@ -//===-- runtime/time-intrinsic.h --------------------------------*- C++ -*-===// +//===-- include/flang/Runtime/time-intrinsic.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. @@ -12,8 +12,8 @@ #ifndef FORTRAN_RUNTIME_TIME_INTRINSIC_H_ #define FORTRAN_RUNTIME_TIME_INTRINSIC_H_ -#include "cpp-type.h" -#include "entry-names.h" +#include "flang/Runtime/cpp-type.h" +#include "flang/Runtime/entry-names.h" namespace Fortran::runtime { diff --git a/flang/runtime/transformational.h b/flang/include/flang/Runtime/transformational.h rename from flang/runtime/transformational.h rename to flang/include/flang/Runtime/transformational.h --- a/flang/runtime/transformational.h +++ b/flang/include/flang/Runtime/transformational.h @@ -1,4 +1,4 @@ -//===-- runtime/transformational.h ------------------------------*- C++ -*-===// +//===-- include/flang/Runtime/transformational.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. @@ -17,9 +17,9 @@ #ifndef FORTRAN_RUNTIME_TRANSFORMATIONAL_H_ #define FORTRAN_RUNTIME_TRANSFORMATIONAL_H_ -#include "descriptor.h" -#include "entry-names.h" -#include "memory.h" +#include "flang/Runtime/descriptor.h" +#include "flang/Runtime/entry-names.h" +#include "flang/Runtime/memory.h" namespace Fortran::runtime { diff --git a/flang/runtime/type-code.h b/flang/include/flang/Runtime/type-code.h rename from flang/runtime/type-code.h rename to flang/include/flang/Runtime/type-code.h --- a/flang/runtime/type-code.h +++ b/flang/include/flang/Runtime/type-code.h @@ -1,4 +1,4 @@ -//===-- runtime/type-code.h -------------------------------------*- C++ -*-===// +//===-- include/flang/Runtime/type-code.h -----------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. diff --git a/flang/lib/Evaluate/intrinsics-library.cpp b/flang/lib/Evaluate/intrinsics-library.cpp --- a/flang/lib/Evaluate/intrinsics-library.cpp +++ b/flang/lib/Evaluate/intrinsics-library.cpp @@ -287,7 +287,7 @@ // First declare all libpgmaths functions #define PGMATH_LINKING #define PGMATH_DECLARE -#include "../runtime/pgmath.h.inc" +#include "flang/Evaluate/pgmath.h.inc" #define REAL_FOLDER(name, func) \ FolderFactory::Create(#name) @@ -295,7 +295,7 @@ static constexpr HostRuntimeFunction table[]{ #define PGMATH_FAST #define PGMATH_USE_S(name, func) REAL_FOLDER(name, func), -#include "../runtime/pgmath.h.inc" +#include "flang/Evaluate/pgmath.h.inc" }; static constexpr HostRuntimeMap map{table}; static_assert(map.Verify(), "map must be sorted"); @@ -304,7 +304,7 @@ static constexpr HostRuntimeFunction table[]{ #define PGMATH_FAST #define PGMATH_USE_D(name, func) REAL_FOLDER(name, func), -#include "../runtime/pgmath.h.inc" +#include "flang/Evaluate/pgmath.h.inc" }; static constexpr HostRuntimeMap map{table}; static_assert(map.Verify(), "map must be sorted"); @@ -313,7 +313,7 @@ static constexpr HostRuntimeFunction table[]{ #define PGMATH_RELAXED #define PGMATH_USE_S(name, func) REAL_FOLDER(name, func), -#include "../runtime/pgmath.h.inc" +#include "flang/Evaluate/pgmath.h.inc" }; static constexpr HostRuntimeMap map{table}; static_assert(map.Verify(), "map must be sorted"); @@ -322,7 +322,7 @@ static constexpr HostRuntimeFunction table[]{ #define PGMATH_RELAXED #define PGMATH_USE_D(name, func) REAL_FOLDER(name, func), -#include "../runtime/pgmath.h.inc" +#include "flang/Evaluate/pgmath.h.inc" }; static constexpr HostRuntimeMap map{table}; static_assert(map.Verify(), "map must be sorted"); @@ -331,7 +331,7 @@ static constexpr HostRuntimeFunction table[]{ #define PGMATH_PRECISE #define PGMATH_USE_S(name, func) REAL_FOLDER(name, func), -#include "../runtime/pgmath.h.inc" +#include "flang/Evaluate/pgmath.h.inc" }; static constexpr HostRuntimeMap map{table}; static_assert(map.Verify(), "map must be sorted"); @@ -340,7 +340,7 @@ static constexpr HostRuntimeFunction table[]{ #define PGMATH_PRECISE #define PGMATH_USE_D(name, func) REAL_FOLDER(name, func), -#include "../runtime/pgmath.h.inc" +#include "flang/Evaluate/pgmath.h.inc" }; static constexpr HostRuntimeMap map{table}; static_assert(map.Verify(), "map must be sorted"); diff --git a/flang/lib/Lower/CharacterRuntime.cpp b/flang/lib/Lower/CharacterRuntime.cpp --- a/flang/lib/Lower/CharacterRuntime.cpp +++ b/flang/lib/Lower/CharacterRuntime.cpp @@ -7,11 +7,11 @@ //===----------------------------------------------------------------------===// #include "flang/Lower/CharacterRuntime.h" -#include "../../runtime/character.h" #include "RTBuilder.h" #include "flang/Lower/Bridge.h" #include "flang/Lower/CharacterExpr.h" #include "flang/Lower/FIRBuilder.h" +#include "flang/Runtime/character.h" #include "mlir/Dialect/StandardOps/IR/Ops.h" using namespace Fortran::runtime; diff --git a/flang/lib/Lower/IO.cpp b/flang/lib/Lower/IO.cpp --- a/flang/lib/Lower/IO.cpp +++ b/flang/lib/Lower/IO.cpp @@ -7,7 +7,6 @@ //===----------------------------------------------------------------------===// #include "flang/Lower/IO.h" -#include "../../runtime/io-api.h" #include "RTBuilder.h" #include "flang/Lower/Bridge.h" #include "flang/Lower/CharacterExpr.h" @@ -17,6 +16,7 @@ #include "flang/Lower/Runtime.h" #include "flang/Lower/Utils.h" #include "flang/Parser/parse-tree.h" +#include "flang/Runtime/io-api.h" #include "flang/Semantics/tools.h" #include "mlir/Dialect/StandardOps/IR/Ops.h" diff --git a/flang/lib/Lower/IntrinsicCall.cpp b/flang/lib/Lower/IntrinsicCall.cpp --- a/flang/lib/Lower/IntrinsicCall.cpp +++ b/flang/lib/Lower/IntrinsicCall.cpp @@ -29,7 +29,7 @@ #include #define PGMATH_DECLARE -#include "../runtime/pgmath.h.inc" +#include "flang/Evaluate/pgmath.h.inc" /// This file implements lowering of Fortran intrinsic procedures. /// Intrinsics are lowered to a mix of FIR and MLIR operations as @@ -283,17 +283,17 @@ static constexpr RuntimeFunction pgmathFast[] = { #define PGMATH_FAST #define PGMATH_USE_ALL_TYPES(name, func) RUNTIME_STATIC_DESCRIPTION(name, func) -#include "../runtime/pgmath.h.inc" +#include "flang/Evaluate/pgmath.h.inc" }; static constexpr RuntimeFunction pgmathRelaxed[] = { #define PGMATH_RELAXED #define PGMATH_USE_ALL_TYPES(name, func) RUNTIME_STATIC_DESCRIPTION(name, func) -#include "../runtime/pgmath.h.inc" +#include "flang/Evaluate/pgmath.h.inc" }; static constexpr RuntimeFunction pgmathPrecise[] = { #define PGMATH_PRECISE #define PGMATH_USE_ALL_TYPES(name, func) RUNTIME_STATIC_DESCRIPTION(name, func) -#include "../runtime/pgmath.h.inc" +#include "flang/Evaluate/pgmath.h.inc" }; static mlir::FunctionType genF32F32FuncType(mlir::MLIRContext *context) { diff --git a/flang/lib/Lower/RTBuilder.h b/flang/lib/Lower/RTBuilder.h --- a/flang/lib/Lower/RTBuilder.h +++ b/flang/lib/Lower/RTBuilder.h @@ -25,7 +25,7 @@ #include // List the runtime headers we want to be able to dissect -#include "../../runtime/io-api.h" +#include "flang/Runtime/io-api.h" namespace Fortran::lower { diff --git a/flang/lib/Semantics/compute-offsets.cpp b/flang/lib/Semantics/compute-offsets.cpp --- a/flang/lib/Semantics/compute-offsets.cpp +++ b/flang/lib/Semantics/compute-offsets.cpp @@ -7,11 +7,11 @@ //===----------------------------------------------------------------------===// #include "compute-offsets.h" -#include "../../runtime/descriptor.h" #include "flang/Evaluate/fold-designator.h" #include "flang/Evaluate/fold.h" #include "flang/Evaluate/shape.h" #include "flang/Evaluate/type.h" +#include "flang/Runtime/descriptor.h" #include "flang/Semantics/scope.h" #include "flang/Semantics/semantics.h" #include "flang/Semantics/symbol.h" diff --git a/flang/module/iso_fortran_env.f90 b/flang/module/iso_fortran_env.f90 --- a/flang/module/iso_fortran_env.f90 +++ b/flang/module/iso_fortran_env.f90 @@ -9,7 +9,7 @@ ! See Fortran 2018, clause 16.10.2 ! TODO: These are placeholder values so that some tests can be run. -include '../runtime/magic-numbers.h' ! for IOSTAT= error/end code values +include '../include/flang/Runtime/magic-numbers.h' ! for IOSTAT= error/end code values module iso_fortran_env diff --git a/flang/runtime/ISO_Fortran_binding.cpp b/flang/runtime/ISO_Fortran_binding.cpp --- a/flang/runtime/ISO_Fortran_binding.cpp +++ b/flang/runtime/ISO_Fortran_binding.cpp @@ -9,8 +9,8 @@ // Implements the required interoperability API from ISO_Fortran_binding.h // as specified in section 18.5.5 of Fortran 2018. -#include "../include/flang/ISO_Fortran_binding.h" -#include "descriptor.h" +#include "flang/ISO_Fortran_binding.h" +#include "flang/Runtime/descriptor.h" #include namespace Fortran::ISO { diff --git a/flang/runtime/allocatable.cpp b/flang/runtime/allocatable.cpp --- a/flang/runtime/allocatable.cpp +++ b/flang/runtime/allocatable.cpp @@ -6,12 +6,12 @@ // //===----------------------------------------------------------------------===// -#include "allocatable.h" -#include "assign.h" +#include "flang/Runtime/allocatable.h" #include "derived.h" #include "stat.h" #include "terminator.h" #include "type-info.h" +#include "flang/Runtime/assign.h" namespace Fortran::runtime { extern "C" { diff --git a/flang/runtime/assign.cpp b/flang/runtime/assign.cpp --- a/flang/runtime/assign.cpp +++ b/flang/runtime/assign.cpp @@ -6,12 +6,12 @@ // //===----------------------------------------------------------------------===// -#include "assign.h" +#include "flang/Runtime/assign.h" #include "derived.h" -#include "descriptor.h" #include "stat.h" #include "terminator.h" #include "type-info.h" +#include "flang/Runtime/descriptor.h" namespace Fortran::runtime { diff --git a/flang/runtime/buffer.h b/flang/runtime/buffer.h --- a/flang/runtime/buffer.h +++ b/flang/runtime/buffer.h @@ -12,7 +12,7 @@ #define FORTRAN_RUNTIME_BUFFER_H_ #include "io-error.h" -#include "memory.h" +#include "flang/Runtime/memory.h" #include #include #include diff --git a/flang/runtime/character.cpp b/flang/runtime/character.cpp --- a/flang/runtime/character.cpp +++ b/flang/runtime/character.cpp @@ -6,13 +6,13 @@ // //===----------------------------------------------------------------------===// -#include "character.h" -#include "cpp-type.h" -#include "descriptor.h" +#include "flang/Runtime/character.h" #include "terminator.h" #include "tools.h" #include "flang/Common/bit-population-count.h" #include "flang/Common/uint128.h" +#include "flang/Runtime/cpp-type.h" +#include "flang/Runtime/descriptor.h" #include #include diff --git a/flang/runtime/command.cpp b/flang/runtime/command.cpp --- a/flang/runtime/command.cpp +++ b/flang/runtime/command.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "command.h" +#include "flang/Runtime/command.h" #include "environment.h" namespace Fortran::runtime { diff --git a/flang/runtime/complex-reduction.h b/flang/runtime/complex-reduction.h --- a/flang/runtime/complex-reduction.h +++ b/flang/runtime/complex-reduction.h @@ -15,7 +15,7 @@ #ifndef FORTRAN_RUNTIME_COMPLEX_REDUCTION_H_ #define FORTRAN_RUNTIME_COMPLEX_REDUCTION_H_ -#include "entry-names.h" +#include "flang/Runtime/entry-names.h" #include struct CppDescriptor; /* dummy type name for Fortran::runtime::Descriptor */ diff --git a/flang/runtime/copy.h b/flang/runtime/copy.h --- a/flang/runtime/copy.h +++ b/flang/runtime/copy.h @@ -1,4 +1,4 @@ -//===-- runtime/copy.h -----------------------------------------*- C++ -*-===// +//===-- runtime/copy.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. @@ -12,7 +12,7 @@ #ifndef FORTRAN_RUNTIME_COPY_H_ #define FORTRAN_RUNTIME_COPY_H_ -#include "descriptor.h" +#include "flang/Runtime/descriptor.h" namespace Fortran::runtime { diff --git a/flang/runtime/copy.cpp b/flang/runtime/copy.cpp --- a/flang/runtime/copy.cpp +++ b/flang/runtime/copy.cpp @@ -7,10 +7,10 @@ //===----------------------------------------------------------------------===// #include "copy.h" -#include "allocatable.h" -#include "descriptor.h" #include "terminator.h" #include "type-info.h" +#include "flang/Runtime/allocatable.h" +#include "flang/Runtime/descriptor.h" #include namespace Fortran::runtime { diff --git a/flang/runtime/derived-api.cpp b/flang/runtime/derived-api.cpp --- a/flang/runtime/derived-api.cpp +++ b/flang/runtime/derived-api.cpp @@ -7,11 +7,11 @@ // //===----------------------------------------------------------------------===// -#include "derived-api.h" +#include "flang/Runtime/derived-api.h" #include "derived.h" -#include "descriptor.h" #include "terminator.h" #include "type-info.h" +#include "flang/Runtime/descriptor.h" namespace Fortran::runtime { diff --git a/flang/runtime/derived.h b/flang/runtime/derived.h --- a/flang/runtime/derived.h +++ b/flang/runtime/derived.h @@ -8,8 +8,8 @@ // Internal runtime utilities for derived type operations. -#ifndef FLANG_RUNTIME_DERIVED_H_ -#define FLANG_RUNTIME_DERIVED_H_ +#ifndef FORTRAN_RUNTIME_DERIVED_H_ +#define FORTRAN_RUNTIME_DERIVED_H_ namespace Fortran::runtime::typeInfo { class DerivedType; @@ -32,4 +32,4 @@ void Destroy(const Descriptor &, bool finalize, const typeInfo::DerivedType &); } // namespace Fortran::runtime -#endif // FLANG_RUNTIME_DERIVED_H_ +#endif // FORTRAN_RUNTIME_DERIVED_H_ diff --git a/flang/runtime/derived.cpp b/flang/runtime/derived.cpp --- a/flang/runtime/derived.cpp +++ b/flang/runtime/derived.cpp @@ -7,10 +7,10 @@ //===----------------------------------------------------------------------===// #include "derived.h" -#include "descriptor.h" #include "stat.h" #include "terminator.h" #include "type-info.h" +#include "flang/Runtime/descriptor.h" namespace Fortran::runtime { diff --git a/flang/runtime/descriptor-io.h b/flang/runtime/descriptor-io.h --- a/flang/runtime/descriptor-io.h +++ b/flang/runtime/descriptor-io.h @@ -14,8 +14,6 @@ // some scalar I/O data transfer APIs could be changed to bypass their use // of descriptors in the future for better efficiency.) -#include "cpp-type.h" -#include "descriptor.h" #include "edit-input.h" #include "edit-output.h" #include "io-stmt.h" @@ -23,6 +21,8 @@ #include "type-info.h" #include "unit.h" #include "flang/Common/uint128.h" +#include "flang/Runtime/cpp-type.h" +#include "flang/Runtime/descriptor.h" namespace Fortran::runtime::io::descr { template diff --git a/flang/runtime/descriptor.cpp b/flang/runtime/descriptor.cpp --- a/flang/runtime/descriptor.cpp +++ b/flang/runtime/descriptor.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "descriptor.h" +#include "flang/Runtime/descriptor.h" #include "derived.h" #include "memory.h" #include "stat.h" diff --git a/flang/runtime/dot-product.cpp b/flang/runtime/dot-product.cpp --- a/flang/runtime/dot-product.cpp +++ b/flang/runtime/dot-product.cpp @@ -6,11 +6,11 @@ // //===----------------------------------------------------------------------===// -#include "cpp-type.h" -#include "descriptor.h" -#include "reduction.h" #include "terminator.h" #include "tools.h" +#include "flang/Runtime/cpp-type.h" +#include "flang/Runtime/descriptor.h" +#include "flang/Runtime/reduction.h" #include namespace Fortran::runtime { diff --git a/flang/runtime/extrema.cpp b/flang/runtime/extrema.cpp --- a/flang/runtime/extrema.cpp +++ b/flang/runtime/extrema.cpp @@ -10,10 +10,10 @@ // and shapes and (for MAXLOC & MINLOC) result integer kinds. Also implements // NORM2 using common infrastructure. -#include "character.h" #include "reduction-templates.h" -#include "reduction.h" #include "flang/Common/long-double.h" +#include "flang/Runtime/character.h" +#include "flang/Runtime/reduction.h" #include #include #include diff --git a/flang/runtime/file.h b/flang/runtime/file.h --- a/flang/runtime/file.h +++ b/flang/runtime/file.h @@ -12,7 +12,7 @@ #define FORTRAN_RUNTIME_FILE_H_ #include "io-error.h" -#include "memory.h" +#include "flang/Runtime/memory.h" #include #include diff --git a/flang/runtime/file.cpp b/flang/runtime/file.cpp --- a/flang/runtime/file.cpp +++ b/flang/runtime/file.cpp @@ -7,8 +7,8 @@ //===----------------------------------------------------------------------===// #include "file.h" -#include "magic-numbers.h" -#include "memory.h" +#include "flang/Runtime/magic-numbers.h" +#include "flang/Runtime/memory.h" #include #include #include diff --git a/flang/runtime/findloc.cpp b/flang/runtime/findloc.cpp --- a/flang/runtime/findloc.cpp +++ b/flang/runtime/findloc.cpp @@ -9,10 +9,10 @@ // Implements FINDLOC for all required operand types and shapes and result // integer kinds. -#include "character.h" #include "reduction-templates.h" -#include "reduction.h" #include "flang/Common/long-double.h" +#include "flang/Runtime/character.h" +#include "flang/Runtime/reduction.h" #include #include diff --git a/flang/runtime/format-implementation.h b/flang/runtime/format-implementation.h --- a/flang/runtime/format-implementation.h +++ b/flang/runtime/format-implementation.h @@ -13,9 +13,9 @@ #include "format.h" #include "io-stmt.h" -#include "main.h" #include "flang/Common/format.h" #include "flang/Decimal/decimal.h" +#include "flang/Runtime/main.h" #include #include diff --git a/flang/runtime/internal-unit.h b/flang/runtime/internal-unit.h --- a/flang/runtime/internal-unit.h +++ b/flang/runtime/internal-unit.h @@ -12,7 +12,7 @@ #define FORTRAN_RUNTIME_IO_INTERNAL_UNIT_H_ #include "connection.h" -#include "descriptor.h" +#include "flang/Runtime/descriptor.h" #include #include diff --git a/flang/runtime/internal-unit.cpp b/flang/runtime/internal-unit.cpp --- a/flang/runtime/internal-unit.cpp +++ b/flang/runtime/internal-unit.cpp @@ -7,8 +7,8 @@ //===----------------------------------------------------------------------===// #include "internal-unit.h" -#include "descriptor.h" #include "io-error.h" +#include "flang/Runtime/descriptor.h" #include #include diff --git a/flang/runtime/io-api.cpp b/flang/runtime/io-api.cpp --- a/flang/runtime/io-api.cpp +++ b/flang/runtime/io-api.cpp @@ -8,18 +8,18 @@ // Implements the I/O statement API -#include "io-api.h" +#include "flang/Runtime/io-api.h" #include "descriptor-io.h" -#include "descriptor.h" #include "edit-input.h" #include "edit-output.h" #include "environment.h" #include "format.h" #include "io-stmt.h" -#include "memory.h" #include "terminator.h" #include "tools.h" #include "unit.h" +#include "flang/Runtime/descriptor.h" +#include "flang/Runtime/memory.h" #include #include diff --git a/flang/runtime/io-error.h b/flang/runtime/io-error.h --- a/flang/runtime/io-error.h +++ b/flang/runtime/io-error.h @@ -15,9 +15,9 @@ #ifndef FORTRAN_RUNTIME_IO_ERROR_H_ #define FORTRAN_RUNTIME_IO_ERROR_H_ -#include "iostat.h" -#include "memory.h" #include "terminator.h" +#include "flang/Runtime/iostat.h" +#include "flang/Runtime/memory.h" #include namespace Fortran::runtime::io { diff --git a/flang/runtime/io-error.cpp b/flang/runtime/io-error.cpp --- a/flang/runtime/io-error.cpp +++ b/flang/runtime/io-error.cpp @@ -8,8 +8,8 @@ #include "io-error.h" #include "config.h" -#include "magic-numbers.h" #include "tools.h" +#include "flang/Runtime/magic-numbers.h" #include #include #include diff --git a/flang/runtime/io-stmt.h b/flang/runtime/io-stmt.h --- a/flang/runtime/io-stmt.h +++ b/flang/runtime/io-stmt.h @@ -12,12 +12,12 @@ #define FORTRAN_RUNTIME_IO_STMT_H_ #include "connection.h" -#include "descriptor.h" #include "file.h" #include "format.h" #include "internal-unit.h" -#include "io-api.h" #include "io-error.h" +#include "flang/Runtime/descriptor.h" +#include "flang/Runtime/io-api.h" #include #include #include diff --git a/flang/runtime/io-stmt.cpp b/flang/runtime/io-stmt.cpp --- a/flang/runtime/io-stmt.cpp +++ b/flang/runtime/io-stmt.cpp @@ -9,9 +9,9 @@ #include "io-stmt.h" #include "connection.h" #include "format.h" -#include "memory.h" #include "tools.h" #include "unit.h" +#include "flang/Runtime/memory.h" #include #include #include diff --git a/flang/runtime/iostat.cpp b/flang/runtime/iostat.cpp --- a/flang/runtime/iostat.cpp +++ b/flang/runtime/iostat.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "iostat.h" +#include "flang/Runtime/iostat.h" namespace Fortran::runtime::io { const char *IostatErrorString(int iostat) { diff --git a/flang/runtime/main.cpp b/flang/runtime/main.cpp --- a/flang/runtime/main.cpp +++ b/flang/runtime/main.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "main.h" +#include "flang/Runtime/main.h" #include "environment.h" #include "terminator.h" #include diff --git a/flang/runtime/matmul.cpp b/flang/runtime/matmul.cpp --- a/flang/runtime/matmul.cpp +++ b/flang/runtime/matmul.cpp @@ -19,11 +19,11 @@ // // Places where BLAS routines could be called are marked as TODO items. -#include "matmul.h" -#include "cpp-type.h" -#include "descriptor.h" +#include "flang/Runtime/matmul.h" #include "terminator.h" #include "tools.h" +#include "flang/Runtime/cpp-type.h" +#include "flang/Runtime/descriptor.h" namespace Fortran::runtime { diff --git a/flang/runtime/memory.cpp b/flang/runtime/memory.cpp --- a/flang/runtime/memory.cpp +++ b/flang/runtime/memory.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "memory.h" +#include "flang/Runtime/memory.h" #include "terminator.h" #include diff --git a/flang/runtime/misc-intrinsic.cpp b/flang/runtime/misc-intrinsic.cpp --- a/flang/runtime/misc-intrinsic.cpp +++ b/flang/runtime/misc-intrinsic.cpp @@ -6,9 +6,9 @@ // //===----------------------------------------------------------------------===// -#include "misc-intrinsic.h" -#include "descriptor.h" +#include "flang/Runtime/misc-intrinsic.h" #include "terminator.h" +#include "flang/Runtime/descriptor.h" #include #include diff --git a/flang/runtime/namelist.cpp b/flang/runtime/namelist.cpp --- a/flang/runtime/namelist.cpp +++ b/flang/runtime/namelist.cpp @@ -8,8 +8,8 @@ #include "namelist.h" #include "descriptor-io.h" -#include "io-api.h" #include "io-stmt.h" +#include "flang/Runtime/io-api.h" #include #include diff --git a/flang/runtime/numeric.cpp b/flang/runtime/numeric.cpp --- a/flang/runtime/numeric.cpp +++ b/flang/runtime/numeric.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "numeric.h" +#include "flang/Runtime/numeric.h" #include "flang/Common/long-double.h" #include #include diff --git a/flang/runtime/pointer.cpp b/flang/runtime/pointer.cpp --- a/flang/runtime/pointer.cpp +++ b/flang/runtime/pointer.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "pointer.h" +#include "flang/Runtime/pointer.h" #include "derived.h" #include "stat.h" #include "terminator.h" diff --git a/flang/runtime/product.cpp b/flang/runtime/product.cpp --- a/flang/runtime/product.cpp +++ b/flang/runtime/product.cpp @@ -9,8 +9,8 @@ // Implements PRODUCT for all required operand types and shapes. #include "reduction-templates.h" -#include "reduction.h" #include "flang/Common/long-double.h" +#include "flang/Runtime/reduction.h" #include #include diff --git a/flang/runtime/random.cpp b/flang/runtime/random.cpp --- a/flang/runtime/random.cpp +++ b/flang/runtime/random.cpp @@ -9,12 +9,12 @@ // Implements the intrinsic subroutines RANDOM_INIT, RANDOM_NUMBER, and // RANDOM_SEED. -#include "random.h" -#include "cpp-type.h" -#include "descriptor.h" +#include "flang/Runtime/random.h" #include "lock.h" #include "flang/Common/leading-zero-bit-count.h" #include "flang/Common/uint128.h" +#include "flang/Runtime/cpp-type.h" +#include "flang/Runtime/descriptor.h" #include #include #include diff --git a/flang/runtime/reduction-templates.h b/flang/runtime/reduction-templates.h --- a/flang/runtime/reduction-templates.h +++ b/flang/runtime/reduction-templates.h @@ -21,10 +21,10 @@ #ifndef FORTRAN_RUNTIME_REDUCTION_TEMPLATES_H_ #define FORTRAN_RUNTIME_REDUCTION_TEMPLATES_H_ -#include "cpp-type.h" -#include "descriptor.h" #include "terminator.h" #include "tools.h" +#include "flang/Runtime/cpp-type.h" +#include "flang/Runtime/descriptor.h" namespace Fortran::runtime { diff --git a/flang/runtime/reduction.cpp b/flang/runtime/reduction.cpp --- a/flang/runtime/reduction.cpp +++ b/flang/runtime/reduction.cpp @@ -12,10 +12,8 @@ // DOT_PRODUCT, FINDLOC, MATMUL, SUM, and PRODUCT are in their own eponymous // source files. // NORM2, MAXLOC, MINLOC, MAXVAL, and MINVAL are in extrema.cpp. -// -// TODO: IALL, IANY -#include "reduction.h" +#include "flang/Runtime/reduction.h" #include "reduction-templates.h" #include diff --git a/flang/runtime/stat.h b/flang/runtime/stat.h --- a/flang/runtime/stat.h +++ b/flang/runtime/stat.h @@ -11,8 +11,8 @@ #ifndef FORTRAN_RUNTIME_STAT_H_ #define FORTRAN_RUNTIME_STAT_H_ -#include "magic-numbers.h" #include "flang/ISO_Fortran_binding.h" +#include "flang/Runtime/magic-numbers.h" namespace Fortran::runtime { class Descriptor; diff --git a/flang/runtime/stat.cpp b/flang/runtime/stat.cpp --- a/flang/runtime/stat.cpp +++ b/flang/runtime/stat.cpp @@ -7,8 +7,8 @@ //===----------------------------------------------------------------------===// #include "stat.h" -#include "descriptor.h" #include "terminator.h" +#include "flang/Runtime/descriptor.h" namespace Fortran::runtime { const char *StatErrorString(int stat) { diff --git a/flang/runtime/stop.cpp b/flang/runtime/stop.cpp --- a/flang/runtime/stop.cpp +++ b/flang/runtime/stop.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "stop.h" +#include "flang/Runtime/stop.h" #include "file.h" #include "io-error.h" #include "terminator.h" diff --git a/flang/runtime/sum.cpp b/flang/runtime/sum.cpp --- a/flang/runtime/sum.cpp +++ b/flang/runtime/sum.cpp @@ -13,8 +13,8 @@ // (basically the same as manual "double-double"). #include "reduction-templates.h" -#include "reduction.h" #include "flang/Common/long-double.h" +#include "flang/Runtime/reduction.h" #include #include diff --git a/flang/runtime/terminator.h b/flang/runtime/terminator.h --- a/flang/runtime/terminator.h +++ b/flang/runtime/terminator.h @@ -11,7 +11,7 @@ #ifndef FORTRAN_RUNTIME_TERMINATOR_H_ #define FORTRAN_RUNTIME_TERMINATOR_H_ -#include "entry-names.h" +#include "flang/Runtime/entry-names.h" #include namespace Fortran::runtime { diff --git a/flang/runtime/time-intrinsic.cpp b/flang/runtime/time-intrinsic.cpp --- a/flang/runtime/time-intrinsic.cpp +++ b/flang/runtime/time-intrinsic.cpp @@ -8,11 +8,10 @@ // Implements time-related intrinsic subroutines. -#include "time-intrinsic.h" - -#include "descriptor.h" +#include "flang/Runtime/time-intrinsic.h" #include "terminator.h" #include "tools.h" +#include "flang/Runtime/descriptor.h" #include #include #include diff --git a/flang/runtime/tools.h b/flang/runtime/tools.h --- a/flang/runtime/tools.h +++ b/flang/runtime/tools.h @@ -9,11 +9,11 @@ #ifndef FORTRAN_RUNTIME_TOOLS_H_ #define FORTRAN_RUNTIME_TOOLS_H_ -#include "cpp-type.h" -#include "descriptor.h" -#include "memory.h" #include "terminator.h" #include "flang/Common/long-double.h" +#include "flang/Runtime/cpp-type.h" +#include "flang/Runtime/descriptor.h" +#include "flang/Runtime/memory.h" #include #include #include diff --git a/flang/runtime/transformational.cpp b/flang/runtime/transformational.cpp --- a/flang/runtime/transformational.cpp +++ b/flang/runtime/transformational.cpp @@ -16,7 +16,7 @@ // work with arbitrary lower bounds. This may be technically an extension // of the standard but it more likely to conform with its intent. -#include "transformational.h" +#include "flang/Runtime/transformational.h" #include "copy.h" #include "terminator.h" #include "tools.h" diff --git a/flang/runtime/type-code.cpp b/flang/runtime/type-code.cpp --- a/flang/runtime/type-code.cpp +++ b/flang/runtime/type-code.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "type-code.h" +#include "flang/Runtime/type-code.h" namespace Fortran::runtime { diff --git a/flang/runtime/type-info.h b/flang/runtime/type-info.h --- a/flang/runtime/type-info.h +++ b/flang/runtime/type-info.h @@ -12,10 +12,10 @@ // A C++ perspective of the derived type description schemata in // flang/module/__fortran_type_info.f90. -#include "descriptor.h" #include "terminator.h" #include "flang/Common/Fortran.h" #include "flang/Common/bit-population-count.h" +#include "flang/Runtime/descriptor.h" #include #include #include diff --git a/flang/runtime/unit-map.h b/flang/runtime/unit-map.h --- a/flang/runtime/unit-map.h +++ b/flang/runtime/unit-map.h @@ -13,8 +13,8 @@ #define FORTRAN_RUNTIME_UNIT_MAP_H_ #include "lock.h" -#include "memory.h" #include "unit.h" +#include "flang/Runtime/memory.h" #include namespace Fortran::runtime::io { diff --git a/flang/runtime/unit.h b/flang/runtime/unit.h --- a/flang/runtime/unit.h +++ b/flang/runtime/unit.h @@ -18,8 +18,8 @@ #include "io-error.h" #include "io-stmt.h" #include "lock.h" -#include "memory.h" #include "terminator.h" +#include "flang/Runtime/memory.h" #include #include #include diff --git a/flang/test/Runtime/no-cpp-dep.c b/flang/test/Runtime/no-cpp-dep.c --- a/flang/test/Runtime/no-cpp-dep.c +++ b/flang/test/Runtime/no-cpp-dep.c @@ -5,10 +5,10 @@ REQUIRES: c-compiler -RUN: %cc -std=c90 %s -I%runtimeincludes %libruntime %libdecimal -o /dev/null +RUN: %cc -std=c90 %s -I%include %libruntime %libdecimal -o /dev/null */ -#include "entry-names.h" +#include "flang/Runtime/entry-names.h" /* Manually add declarations for the runtime functions that we want to make sure diff --git a/flang/test/lit.cfg.py b/flang/test/lit.cfg.py --- a/flang/test/lit.cfg.py +++ b/flang/test/lit.cfg.py @@ -78,16 +78,16 @@ if config.cc: libruntime = os.path.join(config.flang_lib_dir, 'libFortranRuntime.a') libdecimal = os.path.join(config.flang_lib_dir, 'libFortranDecimal.a') - includes = os.path.join(config.flang_src_dir, 'runtime') + include = os.path.join(config.flang_src_dir, 'include') - if os.path.isfile(libruntime) and os.path.isfile(libdecimal) and os.path.isdir(includes): + if os.path.isfile(libruntime) and os.path.isfile(libdecimal) and os.path.isdir(include): config.available_features.add('c-compiler') tools.append(ToolSubst('%cc', command=config.cc, unresolved='fatal')) tools.append(ToolSubst('%libruntime', command=libruntime, unresolved='fatal')) tools.append(ToolSubst('%libdecimal', command=libdecimal, unresolved='fatal')) - tools.append(ToolSubst('%runtimeincludes', command=includes, + tools.append(ToolSubst('%include', command=include, unresolved='fatal')) if config.flang_standalone_build: diff --git a/flang/unittests/Evaluate/ISO-Fortran-binding.cpp b/flang/unittests/Evaluate/ISO-Fortran-binding.cpp --- a/flang/unittests/Evaluate/ISO-Fortran-binding.cpp +++ b/flang/unittests/Evaluate/ISO-Fortran-binding.cpp @@ -1,6 +1,6 @@ #include "testing.h" -#include "../../include/flang/ISO_Fortran_binding.h" -#include "../../runtime/descriptor.h" +#include "flang/ISO_Fortran_binding.h" +#include "flang/Runtime/descriptor.h" #include "llvm/Support/raw_ostream.h" #include diff --git a/flang/unittests/Evaluate/reshape.cpp b/flang/unittests/Evaluate/reshape.cpp --- a/flang/unittests/Evaluate/reshape.cpp +++ b/flang/unittests/Evaluate/reshape.cpp @@ -1,6 +1,6 @@ #include "testing.h" -#include "../../runtime/descriptor.h" -#include "../../runtime/transformational.h" +#include "flang/Runtime/descriptor.h" +#include "flang/Runtime/transformational.h" #include using namespace Fortran::common; diff --git a/flang/unittests/Runtime/CharacterTest.cpp b/flang/unittests/Runtime/CharacterTest.cpp --- a/flang/unittests/Runtime/CharacterTest.cpp +++ b/flang/unittests/Runtime/CharacterTest.cpp @@ -9,9 +9,9 @@ // Basic sanity tests of CHARACTER API; exhaustive testing will be done // in Fortran. -#include "../../runtime/character.h" +#include "flang/Runtime/character.h" #include "gtest/gtest.h" -#include "../../runtime/descriptor.h" +#include "flang/Runtime/descriptor.h" #include #include #include diff --git a/flang/unittests/Runtime/CommandTest.cpp b/flang/unittests/Runtime/CommandTest.cpp --- a/flang/unittests/Runtime/CommandTest.cpp +++ b/flang/unittests/Runtime/CommandTest.cpp @@ -6,10 +6,10 @@ // //===----------------------------------------------------------------------===// -#include "../../runtime/command.h" +#include "flang/Runtime/command.h" #include "gtest/gtest.h" -#include "../../runtime/descriptor.h" -#include "../../runtime/main.h" +#include "flang/Runtime/descriptor.h" +#include "flang/Runtime/main.h" using namespace Fortran::runtime; diff --git a/flang/unittests/Runtime/ExternalIOTest.cpp b/flang/unittests/Runtime/ExternalIOTest.cpp --- a/flang/unittests/Runtime/ExternalIOTest.cpp +++ b/flang/unittests/Runtime/ExternalIOTest.cpp @@ -12,9 +12,9 @@ #include "CrashHandlerFixture.h" #include "gtest/gtest.h" -#include "../../runtime/io-api.h" -#include "../../runtime/main.h" -#include "../../runtime/stop.h" +#include "flang/Runtime/io-api.h" +#include "flang/Runtime/main.h" +#include "flang/Runtime/stop.h" #include "llvm/Support/raw_ostream.h" #include diff --git a/flang/unittests/Runtime/ListInputTest.cpp b/flang/unittests/Runtime/ListInputTest.cpp --- a/flang/unittests/Runtime/ListInputTest.cpp +++ b/flang/unittests/Runtime/ListInputTest.cpp @@ -7,9 +7,9 @@ //===----------------------------------------------------------------------===// #include "CrashHandlerFixture.h" -#include "../../runtime/descriptor.h" -#include "../../runtime/io-api.h" #include "../../runtime/io-error.h" +#include "flang/Runtime/descriptor.h" +#include "flang/Runtime/io-api.h" using namespace Fortran::runtime; using namespace Fortran::runtime::io; diff --git a/flang/unittests/Runtime/Matmul.cpp b/flang/unittests/Runtime/Matmul.cpp --- a/flang/unittests/Runtime/Matmul.cpp +++ b/flang/unittests/Runtime/Matmul.cpp @@ -6,13 +6,13 @@ // //===----------------------------------------------------------------------===// -#include "../../runtime/matmul.h" +#include "flang/Runtime/matmul.h" #include "gtest/gtest.h" #include "tools.h" -#include "../../runtime/allocatable.h" -#include "../../runtime/cpp-type.h" -#include "../../runtime/descriptor.h" -#include "../../runtime/type-code.h" +#include "flang/Runtime/allocatable.h" +#include "flang/Runtime/cpp-type.h" +#include "flang/Runtime/descriptor.h" +#include "flang/Runtime/type-code.h" using namespace Fortran::runtime; using Fortran::common::TypeCategory; diff --git a/flang/unittests/Runtime/MiscIntrinsic.cpp b/flang/unittests/Runtime/MiscIntrinsic.cpp --- a/flang/unittests/Runtime/MiscIntrinsic.cpp +++ b/flang/unittests/Runtime/MiscIntrinsic.cpp @@ -8,10 +8,10 @@ #include "gtest/gtest.h" #include "tools.h" -#include "../../runtime/allocatable.h" -#include "../../runtime/cpp-type.h" -#include "../../runtime/descriptor.h" -#include "../../runtime/misc-intrinsic.h" +#include "flang/Runtime//misc-intrinsic.h" +#include "flang/Runtime/allocatable.h" +#include "flang/Runtime/cpp-type.h" +#include "flang/Runtime/descriptor.h" using namespace Fortran::runtime; diff --git a/flang/unittests/Runtime/Namelist.cpp b/flang/unittests/Runtime/Namelist.cpp --- a/flang/unittests/Runtime/Namelist.cpp +++ b/flang/unittests/Runtime/Namelist.cpp @@ -9,8 +9,8 @@ #include "../../runtime/namelist.h" #include "CrashHandlerFixture.h" #include "tools.h" -#include "../../runtime/descriptor.h" -#include "../../runtime/io-api.h" +#include "flang/Runtime/descriptor.h" +#include "flang/Runtime/io-api.h" #include #include #include diff --git a/flang/unittests/Runtime/Numeric.cpp b/flang/unittests/Runtime/Numeric.cpp --- a/flang/unittests/Runtime/Numeric.cpp +++ b/flang/unittests/Runtime/Numeric.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include "../../runtime/numeric.h" +#include "flang/Runtime/numeric.h" #include "gtest/gtest.h" #include #include diff --git a/flang/unittests/Runtime/NumericalFormatTest.cpp b/flang/unittests/Runtime/NumericalFormatTest.cpp --- a/flang/unittests/Runtime/NumericalFormatTest.cpp +++ b/flang/unittests/Runtime/NumericalFormatTest.cpp @@ -7,8 +7,8 @@ //===----------------------------------------------------------------------===// #include "CrashHandlerFixture.h" -#include "../../runtime/descriptor.h" -#include "../../runtime/io-api.h" +#include "flang/Runtime/descriptor.h" +#include "flang/Runtime/io-api.h" #include #include #include diff --git a/flang/unittests/Runtime/Random.cpp b/flang/unittests/Runtime/Random.cpp --- a/flang/unittests/Runtime/Random.cpp +++ b/flang/unittests/Runtime/Random.cpp @@ -6,10 +6,10 @@ // //===----------------------------------------------------------------------===// -#include "../../runtime/random.h" +#include "flang/Runtime//random.h" #include "gtest/gtest.h" -#include "../../runtime/descriptor.h" -#include "../../runtime/type-code.h" +#include "flang/Runtime/descriptor.h" +#include "flang/Runtime/type-code.h" #include using namespace Fortran::runtime; diff --git a/flang/unittests/Runtime/Reduction.cpp b/flang/unittests/Runtime/Reduction.cpp --- a/flang/unittests/Runtime/Reduction.cpp +++ b/flang/unittests/Runtime/Reduction.cpp @@ -6,13 +6,13 @@ // //===----------------------------------------------------------------------===// -#include "../../runtime/reduction.h" +#include "flang/Runtime/reduction.h" #include "gtest/gtest.h" #include "tools.h" -#include "../../runtime/allocatable.h" -#include "../../runtime/cpp-type.h" -#include "../../runtime/descriptor.h" -#include "../../runtime/type-code.h" +#include "flang/Runtime/allocatable.h" +#include "flang/Runtime/cpp-type.h" +#include "flang/Runtime/descriptor.h" +#include "flang/Runtime/type-code.h" #include #include #include diff --git a/flang/unittests/Runtime/RuntimeCrashTest.cpp b/flang/unittests/Runtime/RuntimeCrashTest.cpp --- a/flang/unittests/Runtime/RuntimeCrashTest.cpp +++ b/flang/unittests/Runtime/RuntimeCrashTest.cpp @@ -11,8 +11,8 @@ // //===----------------------------------------------------------------------===// #include "CrashHandlerFixture.h" -#include "../../runtime/io-api.h" #include "../../runtime/terminator.h" +#include "flang/Runtime/io-api.h" #include using namespace Fortran::runtime; diff --git a/flang/unittests/Runtime/Time.cpp b/flang/unittests/Runtime/Time.cpp --- a/flang/unittests/Runtime/Time.cpp +++ b/flang/unittests/Runtime/Time.cpp @@ -7,7 +7,7 @@ //===----------------------------------------------------------------------===// #include "gtest/gtest.h" -#include "../../runtime/time-intrinsic.h" +#include "flang/Runtime/time-intrinsic.h" #include #include #include diff --git a/flang/unittests/Runtime/Transformational.cpp b/flang/unittests/Runtime/Transformational.cpp --- a/flang/unittests/Runtime/Transformational.cpp +++ b/flang/unittests/Runtime/Transformational.cpp @@ -6,10 +6,10 @@ // //===----------------------------------------------------------------------===// -#include "../../runtime/transformational.h" +#include "flang/Runtime/transformational.h" #include "gtest/gtest.h" #include "tools.h" -#include "../../runtime/type-code.h" +#include "flang/Runtime/type-code.h" using namespace Fortran::runtime; using Fortran::common::TypeCategory; diff --git a/flang/unittests/Runtime/tools.h b/flang/unittests/Runtime/tools.h --- a/flang/unittests/Runtime/tools.h +++ b/flang/unittests/Runtime/tools.h @@ -10,10 +10,10 @@ #define FORTRAN_UNITTESTS_RUNTIME_TOOLS_H_ #include "gtest/gtest.h" -#include "../../runtime/allocatable.h" -#include "../../runtime/cpp-type.h" -#include "../../runtime/descriptor.h" -#include "../../runtime/type-code.h" +#include "flang/Runtime/allocatable.h" +#include "flang/Runtime/cpp-type.h" +#include "flang/Runtime/descriptor.h" +#include "flang/Runtime/type-code.h" #include #include #include