Skip to content

Commit b9bbae9

Browse files
committed
Merge branch 'users/meinersbur/flang_runtime_flang_rt' into users/meinersbur/flang_runtime_move-files
2 parents f2e1535 + c3924da commit b9bbae9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+121
-118
lines changed

flang/include/flang/Common/ISO_Fortran_binding_wrapper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
/* clang-format off */
2424
#include <stddef.h>
25-
#include "flang/Common/api-attrs.h"
25+
#include "api-attrs.h"
2626
#ifdef __cplusplus
2727
namespace Fortran {
2828
namespace ISO {

flang/include/flang/Common/erfc-scaled.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
#ifndef FORTRAN_COMMON_ERFC_SCALED_H_
1010
#define FORTRAN_COMMON_ERFC_SCALED_H_
1111

12+
#include <cmath>
13+
#include <limits>
14+
1215
namespace Fortran::common {
1316
template <typename T> inline T ErfcScaled(T arg) {
1417
// Coefficients for approximation to erfc in the first interval.

flang/include/flang/Common/format.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
#ifndef FORTRAN_COMMON_FORMAT_H_
1010
#define FORTRAN_COMMON_FORMAT_H_
1111

12+
#include "Fortran-consts.h"
1213
#include "enum-set.h"
13-
#include "flang/Common/Fortran-consts.h"
1414
#include <cstring>
1515

1616
// Define a FormatValidator class template to validate a format expression

flang/include/flang/Support/indirection.h renamed to flang/include/flang/Common/indirection.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
//===-- include/flang/Support/indirection.h ---------------------*- C++ -*-===//
1+
//===-- include/flang/Common/indirection.h ----------------------*- C++ -*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#ifndef FORTRAN_SUPPORT_INDIRECTION_H_
10-
#define FORTRAN_SUPPORT_INDIRECTION_H_
9+
#ifndef FORTRAN_COMMON_INDIRECTION_H_
10+
#define FORTRAN_COMMON_INDIRECTION_H_
1111

1212
// Define a smart pointer class template that is rather like
1313
// non-nullable std::unique_ptr<>. Indirection<> is, like a C++ reference
@@ -20,7 +20,7 @@
2020
// template class Fortran::common::Indirection<FORWARD_TYPE>;
2121
// in one C++ source file later where a definition of the type is visible.
2222

23-
#include "flang/Common/idioms.h"
23+
#include "idioms.h"
2424
#include <memory>
2525
#include <type_traits>
2626
#include <utility>
@@ -171,4 +171,4 @@ template <typename A> class ForwardOwningPointer {
171171
void (*deleter_)(A *){nullptr};
172172
};
173173
} // namespace Fortran::common
174-
#endif /* FORTRAN_SUPPORT_INDIRECTION_H_ */
174+
#endif // FORTRAN_COMMON_INDIRECTION_H_

flang/include/flang/Support/interval.h renamed to flang/include/flang/Common/interval.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
//===-- include/flang/Support/interval.h ------------------------*- C++ -*-===//
1+
//===-- include/flang/Common/interval.h -------------------------*- C++ -*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#ifndef FORTRAN_SUPPORT_INTERVAL_H_
10-
#define FORTRAN_SUPPORT_INTERVAL_H_
9+
#ifndef FORTRAN_COMMON_INTERVAL_H_
10+
#define FORTRAN_COMMON_INTERVAL_H_
1111

1212
// Defines a generalized template class Interval<A> to represent
1313
// the half-open interval [x .. x+n).
1414

15-
#include "flang/Common/idioms.h"
15+
#include "idioms.h"
1616
#include <algorithm>
1717
#include <cstddef>
1818
#include <utility>
@@ -126,4 +126,4 @@ template <typename A> class Interval {
126126
std::size_t size_{0};
127127
};
128128
} // namespace Fortran::common
129-
#endif /* FORTRAN_SUPPORT_INTERVAL_H_ */
129+
#endif // FORTRAN_COMMON_INTERVAL_H_

flang/include/flang/Common/optional.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#ifndef FORTRAN_COMMON_OPTIONAL_H
2727
#define FORTRAN_COMMON_OPTIONAL_H
2828

29-
#include "flang/Common/api-attrs.h"
29+
#include "api-attrs.h"
3030
#include <optional>
3131
#include <type_traits>
3232

flang/include/flang/Common/real.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// The various representations are distinguished by their binary precisions
1414
// (number of explicit significand bits and any implicit MSB in the fraction).
1515

16-
#include "flang/Common/api-attrs.h"
16+
#include "api-attrs.h"
1717
#include <cinttypes>
1818

1919
namespace Fortran::common {

flang/include/flang/Support/reference-counted.h renamed to flang/include/flang/Common/reference-counted.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
//===-- include/flang/Support/reference-counted.h ---------------*- C++ -*-===//
1+
//===-- include/flang/Common/reference-counted.h ----------------*- C++ -*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#ifndef FORTRAN_SUPPORT_REFERENCE_COUNTED_H_
10-
#define FORTRAN_SUPPORT_REFERENCE_COUNTED_H_
9+
#ifndef FORTRAN_COMMON_REFERENCE_COUNTED_H_
10+
#define FORTRAN_COMMON_REFERENCE_COUNTED_H_
1111

1212
// A class template of smart pointers to objects with their own
1313
// reference counting object lifetimes that's lighter weight
@@ -74,4 +74,4 @@ template <typename A> class CountedReference {
7474
type *p_{nullptr};
7575
};
7676
} // namespace Fortran::common
77-
#endif /* FORTRAN_SUPPORT_REFERENCE_COUNTED_H_ */
77+
#endif // FORTRAN_COMMON_REFERENCE_COUNTED_H_

flang/include/flang/Common/reference-wrapper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#ifndef FORTRAN_COMMON_REFERENCE_WRAPPER_H
2626
#define FORTRAN_COMMON_REFERENCE_WRAPPER_H
2727

28-
#include "flang/Common/api-attrs.h"
28+
#include "api-attrs.h"
2929
#include <functional>
3030
#include <type_traits>
3131

flang/include/flang/Support/reference.h renamed to flang/include/flang/Common/reference.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===-- include/flang/Support/reference.h -----------------------*- C++ -*-===//
1+
//===-- include/flang/Common/reference.h ------------------------*- C++ -*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
@@ -11,8 +11,8 @@
1111
// Use Reference<A> in place of a real A& reference when assignability is
1212
// required; safer than a bare pointer because it's guaranteed to not be null.
1313

14-
#ifndef FORTRAN_SUPPORT_REFERENCE_H_
15-
#define FORTRAN_SUPPORT_REFERENCE_H_
14+
#ifndef FORTRAN_COMMON_REFERENCE_H_
15+
#define FORTRAN_COMMON_REFERENCE_H_
1616
#include <type_traits>
1717
namespace Fortran::common {
1818
template <typename A> class Reference {
@@ -60,4 +60,4 @@ template <typename A> class Reference {
6060
};
6161
template <typename A> Reference(A &) -> Reference<A>;
6262
} // namespace Fortran::common
63-
#endif /* FORTRAN_SUPPORT_REFERENCE_H_ */
63+
#endif

flang/include/flang/Common/restorer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818

1919
#ifndef FORTRAN_COMMON_RESTORER_H_
2020
#define FORTRAN_COMMON_RESTORER_H_
21+
#include "api-attrs.h"
2122
#include "idioms.h"
22-
#include "flang/Common/api-attrs.h"
2323
namespace Fortran::common {
2424
template <typename A> class Restorer {
2525
public:

flang/include/flang/Support/static-multimap-view.h renamed to flang/include/flang/Common/static-multimap-view.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
//===-- include/flang/Support/static-multimap-view.h ------------*- C++ -*-===//
1+
//===-- include/flang/Common/static-multimap-view.h -------------*- C++ -*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#ifndef FORTRAN_SUPPORT_STATIC_MULTIMAP_VIEW_H_
10-
#define FORTRAN_SUPPORT_STATIC_MULTIMAP_VIEW_H_
9+
#ifndef FORTRAN_COMMON_STATIC_MULTIMAP_VIEW_H_
10+
#define FORTRAN_COMMON_STATIC_MULTIMAP_VIEW_H_
1111
#include <algorithm>
1212
#include <utility>
1313

@@ -59,4 +59,4 @@ template <typename V> class StaticMultimapView {
5959
const_iterator end_{nullptr};
6060
};
6161
} // namespace Fortran::common
62-
#endif /* FORTRAN_SUPPORT_STATIC_MULTIMAP_VIEW_H_ */
62+
#endif // FORTRAN_COMMON_STATIC_MULTIMAP_VIEW_H_

flang/include/flang/Common/target-rounding.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
#ifndef FORTRAN_COMMON_TARGET_ROUNDING_H_
1010
#define FORTRAN_COMMON_TARGET_ROUNDING_H_
1111

12-
#include "flang/Common/Fortran-consts.h"
13-
#include "flang/Common/enum-set.h"
12+
#include "Fortran-consts.h"
13+
#include "enum-set.h"
1414

1515
namespace Fortran::common {
1616

flang/include/flang/Support/template.h renamed to flang/include/flang/Common/template.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
//===-- include/flang/Support/template.h ------------------------*- C++ -*-===//
1+
//===-- include/flang/Common/template.h -------------------------*- C++ -*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#ifndef FORTRAN_SUPPORT_TEMPLATE_H_
10-
#define FORTRAN_SUPPORT_TEMPLATE_H_
9+
#ifndef FORTRAN_COMMON_TEMPLATE_H_
10+
#define FORTRAN_COMMON_TEMPLATE_H_
1111

12-
#include "flang/Common/idioms.h"
13-
#include "flang/Common/variant.h"
12+
#include "idioms.h"
13+
#include "variant.h"
1414
#include <functional>
1515
#include <optional>
1616
#include <tuple>
@@ -322,4 +322,4 @@ common::IfNoLvalue<typename VISITOR::Result, VISITOR> SearchTypes(
322322
std::move(visitor), std::move(defaultResult));
323323
}
324324
} // namespace Fortran::common
325-
#endif /* FORTRAN_SUPPORT_TEMPLATE_H_ */
325+
#endif // FORTRAN_COMMON_TEMPLATE_H_

flang/include/flang/Common/uint128.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
#define AVOID_NATIVE_UINT128_T 0
2020
#endif
2121

22+
#include "api-attrs.h"
2223
#include "leading-zero-bit-count.h"
23-
#include "flang/Common/api-attrs.h"
2424
#include <cstdint>
2525
#include <type_traits>
2626

flang/include/flang/Support/unwrap.h renamed to flang/include/flang/Common/unwrap.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
//===-- include/flang/Support/unwrap.h --------------------------*- C++ -*-===//
1+
//===-- include/flang/Common/unwrap.h ---------------------------*- C++ -*-===//
22
//
33
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#ifndef FORTRAN_SUPPORT_UNWRAP_H_
10-
#define FORTRAN_SUPPORT_UNWRAP_H_
9+
#ifndef FORTRAN_COMMON_UNWRAP_H_
10+
#define FORTRAN_COMMON_UNWRAP_H_
1111

1212
#include "indirection.h"
1313
#include "reference-counted.h"
1414
#include "reference.h"
15-
#include "flang/Common/variant.h"
16-
#include "flang/Common/visit.h"
15+
#include "variant.h"
16+
#include "visit.h"
1717
#include <memory>
1818
#include <optional>
1919
#include <type_traits>
@@ -155,4 +155,4 @@ template <typename A, typename B> std::optional<A> UnwrapCopy(const B &x) {
155155
}
156156
}
157157
} // namespace Fortran::common
158-
#endif /* FORTRAN_SUPPORT_UNWRAP_H_ */
158+
#endif // FORTRAN_COMMON_UNWRAP_H_

flang/include/flang/Common/visit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
#ifndef FORTRAN_COMMON_VISIT_H_
2222
#define FORTRAN_COMMON_VISIT_H_
2323

24+
#include "api-attrs.h"
2425
#include "variant.h"
25-
#include "flang/Common/api-attrs.h"
2626
#include <type_traits>
2727

2828
namespace Fortran::common {

flang/include/flang/Evaluate/call.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
#include "constant.h"
1414
#include "formatting.h"
1515
#include "type.h"
16+
#include "flang/Common/indirection.h"
17+
#include "flang/Common/reference.h"
1618
#include "flang/Parser/char-block.h"
1719
#include "flang/Semantics/attr.h"
1820
#include "flang/Support/Fortran.h"
19-
#include "flang/Support/indirection.h"
20-
#include "flang/Support/reference.h"
2121
#include <optional>
2222
#include <vector>
2323

flang/include/flang/Evaluate/characteristics.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
#include "type.h"
2121
#include "flang/Common/enum-set.h"
2222
#include "flang/Common/idioms.h"
23+
#include "flang/Common/indirection.h"
2324
#include "flang/Parser/char-block.h"
2425
#include "flang/Semantics/symbol.h"
2526
#include "flang/Support/Fortran-features.h"
2627
#include "flang/Support/Fortran.h"
27-
#include "flang/Support/indirection.h"
2828
#include <optional>
2929
#include <string>
3030
#include <variant>

flang/include/flang/Evaluate/common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111

1212
#include "flang/Common/enum-set.h"
1313
#include "flang/Common/idioms.h"
14+
#include "flang/Common/indirection.h"
1415
#include "flang/Common/restorer.h"
1516
#include "flang/Common/target-rounding.h"
1617
#include "flang/Parser/char-block.h"
1718
#include "flang/Parser/message.h"
1819
#include "flang/Support/Fortran-features.h"
1920
#include "flang/Support/Fortran.h"
2021
#include "flang/Support/default-kinds.h"
21-
#include "flang/Support/indirection.h"
2222
#include <cinttypes>
2323
#include <map>
2424
#include <set>

flang/include/flang/Evaluate/constant.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
#include "formatting.h"
1313
#include "type.h"
14+
#include "flang/Common/reference.h"
1415
#include "flang/Support/default-kinds.h"
15-
#include "flang/Support/reference.h"
1616
#include <map>
1717
#include <vector>
1818

flang/include/flang/Evaluate/expression.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
#include "type.h"
2323
#include "variable.h"
2424
#include "flang/Common/idioms.h"
25+
#include "flang/Common/indirection.h"
26+
#include "flang/Common/template.h"
2527
#include "flang/Parser/char-block.h"
2628
#include "flang/Support/Fortran.h"
27-
#include "flang/Support/indirection.h"
28-
#include "flang/Support/template.h"
2929
#include <algorithm>
3030
#include <list>
3131
#include <tuple>

flang/include/flang/Evaluate/formatting.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
// This header is meant to be included by the headers that define the several
2020
// representational class templates that need it, not by external clients.
2121

22-
#include "flang/Support/indirection.h"
22+
#include "flang/Common/indirection.h"
2323
#include "llvm/Support/raw_ostream.h"
2424
#include <optional>
2525
#include <type_traits>

flang/include/flang/Evaluate/shape.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
#include "expression.h"
1616
#include "traverse.h"
1717
#include "variable.h"
18+
#include "flang/Common/indirection.h"
1819
#include "flang/Evaluate/type.h"
19-
#include "flang/Support/indirection.h"
2020
#include <optional>
2121
#include <variant>
2222

flang/include/flang/Evaluate/tools.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
#include "traverse.h"
1313
#include "flang/Common/idioms.h"
14+
#include "flang/Common/template.h"
15+
#include "flang/Common/unwrap.h"
1416
#include "flang/Evaluate/constant.h"
1517
#include "flang/Evaluate/expression.h"
1618
#include "flang/Evaluate/shape.h"
@@ -19,8 +21,6 @@
1921
#include "flang/Semantics/attr.h"
2022
#include "flang/Semantics/scope.h"
2123
#include "flang/Semantics/symbol.h"
22-
#include "flang/Support/template.h"
23-
#include "flang/Support/unwrap.h"
2424
#include <array>
2525
#include <optional>
2626
#include <set>

flang/include/flang/Evaluate/traverse.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@
3838
// expression of an ASSOCIATE (or related) construct entity.
3939

4040
#include "expression.h"
41+
#include "flang/Common/indirection.h"
4142
#include "flang/Semantics/symbol.h"
4243
#include "flang/Semantics/type.h"
43-
#include "flang/Support/indirection.h"
4444
#include <set>
4545
#include <type_traits>
4646

0 commit comments

Comments
 (0)