[flang-commits] [flang] 830c0b9 - [flang] Move runtime API headers to flang/include/flang/Runtime
peter klausler via flang-commits
flang-commits at lists.llvm.org
Fri Sep 3 11:08:43 PDT 2021
Author: Peter Klausler
Date: 2021-09-03T11:08:34-07:00
New Revision: 830c0b9023cd0cf91955900e0d96283e7a8c3711
URL: https://github.com/llvm/llvm-project/commit/830c0b9023cd0cf91955900e0d96283e7a8c3711
DIFF: https://github.com/llvm/llvm-project/commit/830c0b9023cd0cf91955900e0d96283e7a8c3711.diff
LOG: [flang] Move runtime API headers to flang/include/flang/Runtime
Move the closure of the subset of flang/runtime/*.h header files that
are referenced by source files outside flang/runtime (apart from unit tests)
into a new directory (flang/include/flang/Runtime) so that relative
include paths into ../runtime need not be used.
flang/runtime/pgmath.h.inc is moved to flang/include/flang/Evaluate;
it's not used by the runtime.
Differential Revision: https://reviews.llvm.org/D109107
Added:
flang/include/flang/Evaluate/pgmath.h.inc
flang/include/flang/Runtime/allocatable.h
flang/include/flang/Runtime/assign.h
flang/include/flang/Runtime/c-or-cpp.h
flang/include/flang/Runtime/character.h
flang/include/flang/Runtime/command.h
flang/include/flang/Runtime/cpp-type.h
flang/include/flang/Runtime/derived-api.h
flang/include/flang/Runtime/descriptor.h
flang/include/flang/Runtime/entry-names.h
flang/include/flang/Runtime/io-api.h
flang/include/flang/Runtime/iostat.h
flang/include/flang/Runtime/magic-numbers.h
flang/include/flang/Runtime/main.h
flang/include/flang/Runtime/matmul.h
flang/include/flang/Runtime/memory.h
flang/include/flang/Runtime/misc-intrinsic.h
flang/include/flang/Runtime/numeric.h
flang/include/flang/Runtime/pointer.h
flang/include/flang/Runtime/random.h
flang/include/flang/Runtime/reduction.h
flang/include/flang/Runtime/stop.h
flang/include/flang/Runtime/time-intrinsic.h
flang/include/flang/Runtime/transformational.h
flang/include/flang/Runtime/type-code.h
Modified:
flang/examples/external-hello.cpp
flang/lib/Evaluate/intrinsics-library.cpp
flang/lib/Lower/CharacterRuntime.cpp
flang/lib/Lower/IO.cpp
flang/lib/Lower/IntrinsicCall.cpp
flang/lib/Lower/RTBuilder.h
flang/lib/Semantics/compute-offsets.cpp
flang/module/iso_fortran_env.f90
flang/runtime/ISO_Fortran_binding.cpp
flang/runtime/allocatable.cpp
flang/runtime/assign.cpp
flang/runtime/buffer.h
flang/runtime/character.cpp
flang/runtime/command.cpp
flang/runtime/complex-reduction.h
flang/runtime/copy.cpp
flang/runtime/copy.h
flang/runtime/derived-api.cpp
flang/runtime/derived.cpp
flang/runtime/derived.h
flang/runtime/descriptor-io.h
flang/runtime/descriptor.cpp
flang/runtime/dot-product.cpp
flang/runtime/extrema.cpp
flang/runtime/file.cpp
flang/runtime/file.h
flang/runtime/findloc.cpp
flang/runtime/format-implementation.h
flang/runtime/internal-unit.cpp
flang/runtime/internal-unit.h
flang/runtime/io-api.cpp
flang/runtime/io-error.cpp
flang/runtime/io-error.h
flang/runtime/io-stmt.cpp
flang/runtime/io-stmt.h
flang/runtime/iostat.cpp
flang/runtime/main.cpp
flang/runtime/matmul.cpp
flang/runtime/memory.cpp
flang/runtime/misc-intrinsic.cpp
flang/runtime/namelist.cpp
flang/runtime/numeric.cpp
flang/runtime/pointer.cpp
flang/runtime/product.cpp
flang/runtime/random.cpp
flang/runtime/reduction-templates.h
flang/runtime/reduction.cpp
flang/runtime/stat.cpp
flang/runtime/stat.h
flang/runtime/stop.cpp
flang/runtime/sum.cpp
flang/runtime/terminator.h
flang/runtime/time-intrinsic.cpp
flang/runtime/tools.h
flang/runtime/transformational.cpp
flang/runtime/type-code.cpp
flang/runtime/type-info.h
flang/runtime/unit-map.h
flang/runtime/unit.h
flang/test/Runtime/no-cpp-dep.c
flang/test/lit.cfg.py
flang/unittests/Evaluate/ISO-Fortran-binding.cpp
flang/unittests/Evaluate/reshape.cpp
flang/unittests/Runtime/CharacterTest.cpp
flang/unittests/Runtime/CommandTest.cpp
flang/unittests/Runtime/ExternalIOTest.cpp
flang/unittests/Runtime/ListInputTest.cpp
flang/unittests/Runtime/Matmul.cpp
flang/unittests/Runtime/MiscIntrinsic.cpp
flang/unittests/Runtime/Namelist.cpp
flang/unittests/Runtime/Numeric.cpp
flang/unittests/Runtime/NumericalFormatTest.cpp
flang/unittests/Runtime/Random.cpp
flang/unittests/Runtime/Reduction.cpp
flang/unittests/Runtime/RuntimeCrashTest.cpp
flang/unittests/Runtime/Time.cpp
flang/unittests/Runtime/Transformational.cpp
flang/unittests/Runtime/tools.h
Removed:
flang/runtime/allocatable.h
flang/runtime/assign.h
flang/runtime/c-or-cpp.h
flang/runtime/character.h
flang/runtime/command.h
flang/runtime/cpp-type.h
flang/runtime/derived-api.h
flang/runtime/descriptor.h
flang/runtime/entry-names.h
flang/runtime/io-api.h
flang/runtime/iostat.h
flang/runtime/magic-numbers.h
flang/runtime/main.h
flang/runtime/matmul.h
flang/runtime/memory.h
flang/runtime/misc-intrinsic.h
flang/runtime/numeric.h
flang/runtime/pgmath.h.inc
flang/runtime/pointer.h
flang/runtime/random.h
flang/runtime/reduction.h
flang/runtime/stop.h
flang/runtime/time-intrinsic.h
flang/runtime/transformational.h
flang/runtime/type-code.h
################################################################################
diff --git a/flang/examples/external-hello.cpp b/flang/examples/external-hello.cpp
index 7c300d702caeb..f06126d67ca3f 100644
--- 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 <cstring>
#include <limits>
diff --git a/flang/runtime/pgmath.h.inc b/flang/include/flang/Evaluate/pgmath.h.inc
similarity index 98%
rename from flang/runtime/pgmath.h.inc
rename to flang/include/flang/Evaluate/pgmath.h.inc
index 4985005bb68bf..02d8ae3c4cd53 100644
--- 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
similarity index 97%
rename from flang/runtime/allocatable.h
rename to flang/include/flang/Runtime/allocatable.h
index 0a7332e0f9c10..4818fdd9c5ea1 100644
--- 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
similarity index 89%
rename from flang/runtime/assign.h
rename to flang/include/flang/Runtime/assign.h
index c68779920269c..141a0b62c54c2 100644
--- 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 @@ void RTNAME(Assign)(Descriptor &to, const Descriptor &from,
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
similarity index 92%
rename from flang/runtime/c-or-cpp.h
rename to flang/include/flang/Runtime/c-or-cpp.h
index 016bce07956db..4babd885cad32 100644
--- 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
similarity index 98%
rename from flang/runtime/character.h
rename to flang/include/flang/Runtime/character.h
index 622fbca17cf6b..441faf2c36333 100644
--- 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 <cstddef>
namespace Fortran::runtime {
diff --git a/flang/runtime/command.h b/flang/include/flang/Runtime/command.h
similarity index 90%
rename from flang/runtime/command.h
rename to flang/include/flang/Runtime/command.h
index 8367d7c33ad88..5e98b41072918 100644
--- 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
similarity index 96%
rename from flang/runtime/cpp-type.h
rename to flang/include/flang/Runtime/cpp-type.h
index 613df974656c8..38a8cf7e7e6cb 100644
--- 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
similarity index 85%
rename from flang/runtime/derived-api.h
rename to flang/include/flang/Runtime/derived-api.h
index 44cd5d6963c66..515905d6c22cf 100644
--- 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 @@ void RTNAME(Assign)(const Descriptor &, const Descriptor &,
} // 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
similarity index 99%
rename from flang/runtime/descriptor.h
rename to flang/include/flang/Runtime/descriptor.h
index a8b23b8ad5821..2b927df3bcd29 100644
--- 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 <cassert>
#include <cinttypes>
#include <cstddef>
diff --git a/flang/runtime/entry-names.h b/flang/include/flang/Runtime/entry-names.h
similarity index 93%
rename from flang/runtime/entry-names.h
rename to flang/include/flang/Runtime/entry-names.h
index 4b669bdf495d9..39a04a902c67d 100644
--- 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
similarity index 99%
rename from flang/runtime/io-api.h
rename to flang/include/flang/Runtime/io-api.h
index 13254ce6f66e7..e6b4617d35772 100644
--- 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 <cinttypes>
#include <cstddef>
diff --git a/flang/runtime/iostat.h b/flang/include/flang/Runtime/iostat.h
similarity index 95%
rename from flang/runtime/iostat.h
rename to flang/include/flang/Runtime/iostat.h
index f51636d5f7d07..ec1c2399819d4 100644
--- 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
similarity index 93%
rename from flang/runtime/magic-numbers.h
rename to flang/include/flang/Runtime/magic-numbers.h
index 388ee8a281a52..f84b7ecf08376 100644
--- 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
similarity index 80%
rename from flang/runtime/main.h
rename to flang/include/flang/Runtime/main.h
index a69eead6bb96c..50bc46e2e8ee9 100644
--- 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
similarity index 91%
rename from flang/runtime/matmul.h
rename to flang/include/flang/Runtime/matmul.h
index 8334d6670a1b0..4598c487a12ca 100644
--- 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
similarity index 97%
rename from flang/runtime/memory.h
rename to flang/include/flang/Runtime/memory.h
index 4b09fe80772ed..0afe5250169d0 100644
--- 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
similarity index 89%
rename from flang/runtime/misc-intrinsic.h
rename to flang/include/flang/Runtime/misc-intrinsic.h
index 16fa355cee2d8..d4c20539532d4 100644
--- 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 <cstdint>
namespace Fortran::runtime {
diff --git a/flang/runtime/numeric.h b/flang/include/flang/Runtime/numeric.h
similarity index 99%
rename from flang/runtime/numeric.h
rename to flang/include/flang/Runtime/numeric.h
index e18ee3631e1de..6130a25e401c3 100644
--- 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
similarity index 97%
rename from flang/runtime/pointer.h
rename to flang/include/flang/Runtime/pointer.h
index 838fde263eb12..ea3e5b7558dad 100644
--- 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
similarity index 89%
rename from flang/runtime/random.h
rename to flang/include/flang/Runtime/random.h
index 5a8488f8059be..388a58973b53f 100644
--- 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 <cstdint>
namespace Fortran::runtime {
diff --git a/flang/runtime/reduction.h b/flang/include/flang/Runtime/reduction.h
similarity index 99%
rename from flang/runtime/reduction.h
rename to flang/include/flang/Runtime/reduction.h
index 4cc0765a345db..d70bb0df10a9a 100644
--- 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 <complex>
#include <cstdint>
diff --git a/flang/runtime/stop.h b/flang/include/flang/Runtime/stop.h
similarity index 88%
rename from flang/runtime/stop.h
rename to flang/include/flang/Runtime/stop.h
index 638fa179edd3d..19c7814a646cd 100644
--- 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 <stdlib.h>
FORTRAN_EXTERN_C_BEGIN
diff --git a/flang/runtime/time-intrinsic.h b/flang/include/flang/Runtime/time-intrinsic.h
similarity index 91%
rename from flang/runtime/time-intrinsic.h
rename to flang/include/flang/Runtime/time-intrinsic.h
index 42ac77fcc0251..c48e9614c8fe0 100644
--- 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
similarity index 93%
rename from flang/runtime/transformational.h
rename to flang/include/flang/Runtime/transformational.h
index 08f2d9afdff6c..ad17d48096c94 100644
--- 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
similarity index 96%
rename from flang/runtime/type-code.h
rename to flang/include/flang/Runtime/type-code.h
index c859edecd40f9..b64167e0b67af 100644
--- 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
index 1023590fd18eb..2aef9f701f0f7 100644
--- a/flang/lib/Evaluate/intrinsics-library.cpp
+++ b/flang/lib/Evaluate/intrinsics-library.cpp
@@ -287,7 +287,7 @@ struct HostRuntimeLibrary<std::complex<HostT>, LibraryVersion::Libm> {
// 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<decltype(&func), &func>::Create(#name)
@@ -295,7 +295,7 @@ template <> struct HostRuntimeLibrary<float, LibraryVersion::PgmathFast> {
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 @@ template <> struct HostRuntimeLibrary<double, LibraryVersion::PgmathFast> {
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 @@ template <> struct HostRuntimeLibrary<float, LibraryVersion::PgmathRelaxed> {
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 @@ template <> struct HostRuntimeLibrary<double, LibraryVersion::PgmathRelaxed> {
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 @@ template <> struct HostRuntimeLibrary<float, LibraryVersion::PgmathPrecise> {
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 @@ template <> struct HostRuntimeLibrary<double, LibraryVersion::PgmathPrecise> {
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
index 4bfbf5824efbb..e0d5dbcae3abe 100644
--- 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
index cca8561b81683..236e90e807932 100644
--- 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
index 2d00e9098b416..ab9c594ee9968 100644
--- a/flang/lib/Lower/IntrinsicCall.cpp
+++ b/flang/lib/Lower/IntrinsicCall.cpp
@@ -29,7 +29,7 @@
#include <utility>
#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 @@ struct RuntimeFunction {
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
index 38dfa6034bdd3..4b4e63dc3bb30 100644
--- a/flang/lib/Lower/RTBuilder.h
+++ b/flang/lib/Lower/RTBuilder.h
@@ -25,7 +25,7 @@
#include <functional>
// 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
index 5ebe3e482a6a3..c878f6c806035 100644
--- 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
index c8dc03b0ee582..3d77485c13e31 100644
--- 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
index c49bb67616869..0a385ec3187ad 100644
--- 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 <cstdlib>
namespace Fortran::ISO {
diff --git a/flang/runtime/allocatable.cpp b/flang/runtime/allocatable.cpp
index 10ccb68637cbe..e0ffd5bf9b24b 100644
--- 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
index 5f31ad0a86b5d..0455980ddd4d3 100644
--- 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
index 10978240a4fb7..eec28419a58f5 100644
--- 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 <algorithm>
#include <cinttypes>
#include <cstring>
diff --git a/flang/runtime/character.cpp b/flang/runtime/character.cpp
index d88db565b8aa8..50f796d8acae5 100644
--- 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 <algorithm>
#include <cstring>
diff --git a/flang/runtime/command.cpp b/flang/runtime/command.cpp
index 603da15b5699b..5d11d6c0c96c8 100644
--- 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
index f26847f2ded5b..5940ffff8cdd3 100644
--- 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 <complex.h>
struct CppDescriptor; /* dummy type name for Fortran::runtime::Descriptor */
diff --git a/flang/runtime/copy.cpp b/flang/runtime/copy.cpp
index 1315472ef50f9..71ef2c2f75665 100644
--- 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 <cstring>
namespace Fortran::runtime {
diff --git a/flang/runtime/copy.h b/flang/runtime/copy.h
index 6de4455868403..6458e799f0fd7 100644
--- 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/derived-api.cpp b/flang/runtime/derived-api.cpp
index 98a0096e1d5a6..fa76b963aafb2 100644
--- 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.cpp b/flang/runtime/derived.cpp
index 6ae4d3e146b31..887d813629764 100644
--- 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/derived.h b/flang/runtime/derived.h
index e6b35acdd8204..d655a672a84d4 100644
--- 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 Finalize(const Descriptor &, const typeInfo::DerivedType &derived);
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/descriptor-io.h b/flang/runtime/descriptor-io.h
index 52b328b8c8371..e8cfc333649cc 100644
--- 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 <typename A>
diff --git a/flang/runtime/descriptor.cpp b/flang/runtime/descriptor.cpp
index 274cdd7b376a8..fcb1c977f0d81 100644
--- 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
index 075d987b4de02..db790c392c11b 100644
--- 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 <cinttypes>
namespace Fortran::runtime {
diff --git a/flang/runtime/extrema.cpp b/flang/runtime/extrema.cpp
index c0a97da259fed..3e471b3c09c15 100644
--- 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 <algorithm>
#include <cinttypes>
#include <cmath>
diff --git a/flang/runtime/file.cpp b/flang/runtime/file.cpp
index faf40518a3321..b8e349be8a21b 100644
--- 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 <algorithm>
#include <cerrno>
#include <cstring>
diff --git a/flang/runtime/file.h b/flang/runtime/file.h
index 7e7b27c4be2a4..3770b190ee741 100644
--- 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 <cinttypes>
#include <optional>
diff --git a/flang/runtime/findloc.cpp b/flang/runtime/findloc.cpp
index 74d9474f4f4dd..f268d462b43bf 100644
--- 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 <cinttypes>
#include <complex>
diff --git a/flang/runtime/format-implementation.h b/flang/runtime/format-implementation.h
index 8c41a984693fa..b0ebcbc607fab 100644
--- 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 <algorithm>
#include <limits>
diff --git a/flang/runtime/internal-unit.cpp b/flang/runtime/internal-unit.cpp
index 0c1d696c35285..1cd0909331a9c 100644
--- 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 <algorithm>
#include <type_traits>
diff --git a/flang/runtime/internal-unit.h b/flang/runtime/internal-unit.h
index e5137ebfe1ad6..a26bcf64d97d4 100644
--- 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 <cinttypes>
#include <type_traits>
diff --git a/flang/runtime/io-api.cpp b/flang/runtime/io-api.cpp
index d902bfea3e689..43c59039965e4 100644
--- 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 <cstdlib>
#include <memory>
diff --git a/flang/runtime/io-error.cpp b/flang/runtime/io-error.cpp
index 529a51c246435..48647ec8805e7 100644
--- 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 <cerrno>
#include <cstdarg>
#include <cstdio>
diff --git a/flang/runtime/io-error.h b/flang/runtime/io-error.h
index dd2a269fef89a..c530a120c381e 100644
--- 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 <cinttypes>
namespace Fortran::runtime::io {
diff --git a/flang/runtime/io-stmt.cpp b/flang/runtime/io-stmt.cpp
index edea5dc6ac662..0f64d76af5667 100644
--- 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 <algorithm>
#include <cstdio>
#include <cstring>
diff --git a/flang/runtime/io-stmt.h b/flang/runtime/io-stmt.h
index 32aeae09c3afc..dfaed3eaf2c0b 100644
--- 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 <functional>
#include <type_traits>
#include <variant>
diff --git a/flang/runtime/iostat.cpp b/flang/runtime/iostat.cpp
index 15a487765e6d5..649141fb8ea51 100644
--- 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
index bc3c044393103..56a47094ea7af 100644
--- 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 <cfenv>
diff --git a/flang/runtime/matmul.cpp b/flang/runtime/matmul.cpp
index 3d10ca0a31c6b..ec1581456fcb9 100644
--- 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
index 4fa599b748b8e..5ed737905a9cb 100644
--- 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 <cstdlib>
diff --git a/flang/runtime/misc-intrinsic.cpp b/flang/runtime/misc-intrinsic.cpp
index 3d77ce7a55517..7b8509a8dccb5 100644
--- 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 <algorithm>
#include <cstring>
diff --git a/flang/runtime/namelist.cpp b/flang/runtime/namelist.cpp
index 42140c5d9502f..b9b5fbc3e4e03 100644
--- 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 <cstring>
#include <limits>
diff --git a/flang/runtime/numeric.cpp b/flang/runtime/numeric.cpp
index fa3cbb4e4f164..c04d50111934b 100644
--- 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 <climits>
#include <cmath>
diff --git a/flang/runtime/pointer.cpp b/flang/runtime/pointer.cpp
index 9b6bfee380194..dd41e1f060aa0 100644
--- 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
index 9ef2d999110d6..d245e0da8a458 100644
--- 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 <cinttypes>
#include <complex>
diff --git a/flang/runtime/random.cpp b/flang/runtime/random.cpp
index 0ae4f270c19c3..f425046235215 100644
--- 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 <algorithm>
#include <cmath>
#include <cstdint>
diff --git a/flang/runtime/reduction-templates.h b/flang/runtime/reduction-templates.h
index ff9841a9e4756..11b491a6466a5 100644
--- 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
index 66fe9efa56222..0f858c888b6cd 100644
--- 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 <cinttypes>
diff --git a/flang/runtime/stat.cpp b/flang/runtime/stat.cpp
index 5fb68d23aa8b5..c0620f4c23e33 100644
--- 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/stat.h b/flang/runtime/stat.h
index 19098b9b00490..5c1828e918bfe 100644
--- 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/stop.cpp b/flang/runtime/stop.cpp
index b448e2e7ccfa0..2a666b5af547d 100644
--- 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
index fb32505419533..6bdb599eea75c 100644
--- 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 <cinttypes>
#include <complex>
diff --git a/flang/runtime/terminator.h b/flang/runtime/terminator.h
index 02d97bef94561..dbf08fec60c99 100644
--- 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 <cstdarg>
namespace Fortran::runtime {
diff --git a/flang/runtime/time-intrinsic.cpp b/flang/runtime/time-intrinsic.cpp
index 80064c9244686..7a70f5253d030 100644
--- 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 <algorithm>
#include <cstdint>
#include <cstdio>
diff --git a/flang/runtime/tools.h b/flang/runtime/tools.h
index 2daa53aecf21a..ee2641b305b05 100644
--- 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 <functional>
#include <map>
#include <type_traits>
diff --git a/flang/runtime/transformational.cpp b/flang/runtime/transformational.cpp
index 1bf93386dd88a..20d6100fab047 100644
--- 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
index a38a7ab041b07..d09959b3d927c 100644
--- 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
index 4e9a100fe8d75..9f9bfb6337ddb 100644
--- 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 <cinttypes>
#include <memory>
#include <optional>
diff --git a/flang/runtime/unit-map.h b/flang/runtime/unit-map.h
index 961962a2d635c..d7d3613b53e61 100644
--- 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 <cstdlib>
namespace Fortran::runtime::io {
diff --git a/flang/runtime/unit.h b/flang/runtime/unit.h
index 99ba05d78bee6..797c9fda73165 100644
--- 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 <cstdlib>
#include <cstring>
#include <optional>
diff --git a/flang/test/Runtime/no-cpp-dep.c b/flang/test/Runtime/no-cpp-dep.c
index c1d5ba39995d0..9f3b8b9269eed 100644
--- a/flang/test/Runtime/no-cpp-dep.c
+++ b/flang/test/Runtime/no-cpp-dep.c
@@ -5,10 +5,10 @@ a C compiler.
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
index 317a0d7f5c8ec..130f74501b25e 100644
--- 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
index 863189250a3d3..d356d19add8fe 100644
--- 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 <type_traits>
diff --git a/flang/unittests/Evaluate/reshape.cpp b/flang/unittests/Evaluate/reshape.cpp
index b4c1eff8b1482..5d138cd3d88d9 100644
--- 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 <cinttypes>
using namespace Fortran::common;
diff --git a/flang/unittests/Runtime/CharacterTest.cpp b/flang/unittests/Runtime/CharacterTest.cpp
index a386365f57b5f..d6d3439084a19 100644
--- 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 <cstring>
#include <functional>
#include <tuple>
diff --git a/flang/unittests/Runtime/CommandTest.cpp b/flang/unittests/Runtime/CommandTest.cpp
index 9c67329edfc02..84a05fc34e10b 100644
--- 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
index e1621edca40df..b75a7fe7d027b 100644
--- 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 <cstring>
diff --git a/flang/unittests/Runtime/ListInputTest.cpp b/flang/unittests/Runtime/ListInputTest.cpp
index 7bcfa0f6c67db..50df1a72316d6 100644
--- 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
index 1f0c756bc5d72..25e3b20b470c5 100644
--- 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
index 62213d01021e9..bfdd6d6f6865c 100644
--- 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
index 8f896cbe2448a..67336bb995a24 100644
--- 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 <algorithm>
#include <cinttypes>
#include <complex>
diff --git a/flang/unittests/Runtime/Numeric.cpp b/flang/unittests/Runtime/Numeric.cpp
index f37ac27a610e0..571247ab63387 100644
--- 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 <cmath>
#include <limits>
diff --git a/flang/unittests/Runtime/NumericalFormatTest.cpp b/flang/unittests/Runtime/NumericalFormatTest.cpp
index 746a4958f4288..e2cad5ff80755 100644
--- 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 <algorithm>
#include <array>
#include <cstring>
diff --git a/flang/unittests/Runtime/Random.cpp b/flang/unittests/Runtime/Random.cpp
index f16f3dc1a47fa..c9abe04b934c9 100644
--- 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 <cmath>
using namespace Fortran::runtime;
diff --git a/flang/unittests/Runtime/Reduction.cpp b/flang/unittests/Runtime/Reduction.cpp
index e709b0c8f9ed3..32520cbde1db9 100644
--- 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 <cstdint>
#include <cstring>
#include <string>
diff --git a/flang/unittests/Runtime/RuntimeCrashTest.cpp b/flang/unittests/Runtime/RuntimeCrashTest.cpp
index c8945409c8c79..d22a253a757f5 100644
--- 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 <gtest/gtest.h>
using namespace Fortran::runtime;
diff --git a/flang/unittests/Runtime/Time.cpp b/flang/unittests/Runtime/Time.cpp
index ba54ddafacb85..4720e7e8adb67 100644
--- 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 <algorithm>
#include <cctype>
#include <charconv>
diff --git a/flang/unittests/Runtime/Transformational.cpp b/flang/unittests/Runtime/Transformational.cpp
index 52e0b7ecfec0c..ac4d9dd008c9c 100644
--- 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
index bca579b5e1afa..b25e296b539ac 100644
--- 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 <cstdint>
#include <cstring>
#include <vector>
More information about the flang-commits
mailing list