Skip to content

Commit 72e3c5d

Browse files
committed
[Flang] Introduce FortranSupport
1 parent 57466db commit 72e3c5d

File tree

160 files changed

+333
-332
lines changed

Some content is hidden

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

160 files changed

+333
-332
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
/*===-- include/flang/ISO_Fortran_binding_wrapper.h ---------------*- C++ -*-===
1+
/*===-- include/flang/Common/ISO_Fortran_binding_wrapper.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
*
7-
* ===-----------------------------------------------------------------------===
8-
*/
7+
*===----------------------------------------------------------------------===*/
98

10-
#ifndef FORTRAN_ISO_FORTRAN_BINDING_WRAPPER_H_
11-
#define FORTRAN_ISO_FORTRAN_BINDING_WRAPPER_H_
9+
#ifndef FORTRAN_COMMON_ISO_FORTRAN_BINDING_WRAPPER_H_
10+
#define FORTRAN_COMMON_ISO_FORTRAN_BINDING_WRAPPER_H_
1211

1312
/* A thin wrapper around flang/include/ISO_Fortran_binding.h
1413
* This header file must be included when ISO_Fortran_binding.h
@@ -23,17 +22,17 @@
2322

2423
/* clang-format off */
2524
#include <stddef.h>
26-
#include "Common/api-attrs.h"
25+
#include "flang/Common/api-attrs.h"
2726
#ifdef __cplusplus
2827
namespace Fortran {
2928
namespace ISO {
3029
#define FORTRAN_ISO_NAMESPACE_ ::Fortran::ISO
3130
#endif /* __cplusplus */
32-
#include "ISO_Fortran_binding.h"
31+
#include "flang/ISO_Fortran_binding.h"
3332
#ifdef __cplusplus
3433
} // namespace ISO
3534
} // namespace Fortran
3635
#endif /* __cplusplus */
3736
/* clang-format on */
3837

39-
#endif /* FORTRAN_ISO_FORTRAN_BINDING_WRAPPER_H_ */
38+
#endif /* FORTRAN_COMMON_ISO_FORTRAN_BINDING_WRAPPER_H_ */

flang/include/flang/Common/fast-int-set.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#ifndef FORTRAN_COMMON_FAST_INT_SET_H_
2525
#define FORTRAN_COMMON_FAST_INT_SET_H_
2626

27-
#include <optional>
27+
#include "optional.h"
2828

2929
namespace Fortran::common {
3030

@@ -83,9 +83,9 @@ template <int N> class FastIntSet {
8383
}
8484
}
8585

86-
std::optional<int> PopValue() {
86+
optional<int> PopValue() {
8787
if (IsEmpty()) {
88-
return std::nullopt;
88+
return nullopt;
8989
} else {
9090
return value_[--size_];
9191
}

flang/include/flang/Evaluate/call.h

Lines changed: 3 additions & 3 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/Fortran.h"
17-
#include "flang/Common/indirection.h"
18-
#include "flang/Common/reference.h"
1916
#include "flang/Parser/char-block.h"
2017
#include "flang/Semantics/attr.h"
18+
#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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
#include "shape.h"
1919
#include "tools.h"
2020
#include "type.h"
21-
#include "flang/Common/Fortran-features.h"
22-
#include "flang/Common/Fortran.h"
2321
#include "flang/Common/enum-set.h"
2422
#include "flang/Common/idioms.h"
25-
#include "flang/Common/indirection.h"
2623
#include "flang/Parser/char-block.h"
2724
#include "flang/Semantics/symbol.h"
25+
#include "flang/Support/Fortran-features.h"
26+
#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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99
#ifndef FORTRAN_EVALUATE_COMMON_H_
1010
#define FORTRAN_EVALUATE_COMMON_H_
1111

12-
#include "flang/Common/Fortran-features.h"
13-
#include "flang/Common/Fortran.h"
14-
#include "flang/Common/default-kinds.h"
1512
#include "flang/Common/enum-set.h"
1613
#include "flang/Common/idioms.h"
17-
#include "flang/Common/indirection.h"
1814
#include "flang/Common/restorer.h"
1915
#include "flang/Common/target-rounding.h"
2016
#include "flang/Parser/char-block.h"
2117
#include "flang/Parser/message.h"
18+
#include "flang/Support/Fortran-features.h"
19+
#include "flang/Support/Fortran.h"
20+
#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: 2 additions & 2 deletions
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/default-kinds.h"
15-
#include "flang/Common/reference.h"
14+
#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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
#include "formatting.h"
2222
#include "type.h"
2323
#include "variable.h"
24-
#include "flang/Common/Fortran.h"
2524
#include "flang/Common/idioms.h"
26-
#include "flang/Common/indirection.h"
27-
#include "flang/Common/template.h"
2825
#include "flang/Parser/char-block.h"
26+
#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/Common/indirection.h"
22+
#include "flang/Support/indirection.h"
2323
#include "llvm/Support/raw_ostream.h"
2424
#include <optional>
2525
#include <type_traits>

flang/include/flang/Evaluate/intrinsics.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
#include "call.h"
1313
#include "characteristics.h"
1414
#include "type.h"
15-
#include "flang/Common/default-kinds.h"
1615
#include "flang/Parser/char-block.h"
1716
#include "flang/Parser/message.h"
17+
#include "flang/Support/default-kinds.h"
1818
#include <memory>
1919
#include <optional>
2020
#include <string>

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"
1918
#include "flang/Evaluate/type.h"
19+
#include "flang/Support/indirection.h"
2020
#include <optional>
2121
#include <variant>
2222

0 commit comments

Comments
 (0)