Skip to content

Commit 2216bfe

Browse files
committed
Move files to FortranRuntime
1 parent 98c71d8 commit 2216bfe

File tree

419 files changed

+873
-777
lines changed

Some content is hidden

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

419 files changed

+873
-777
lines changed

FortranRuntime/.clang-format

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
# See: https://clang.llvm.org/docs/ClangFormatStyleOptions.html
3+
BasedOnStyle: LLVM
4+
AlignAfterOpenBracket: DontAlign
5+
AlignEscapedNewlines: DontAlign
6+
AlignConsecutiveAssignments: false
7+
AlignConsecutiveDeclarations: false
8+
AlignOperands: false
9+
AlignTrailingComments: false
10+
IncludeCategories:
11+
- Regex: '^<'
12+
Priority: 4
13+
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
14+
Priority: 3
15+
- Regex: '^"(flang|\.\.)/'
16+
Priority: 2
17+
- Regex: '.*'
18+
Priority: 1
19+
...
20+
21+
# vim:set filetype=yaml:
File renamed without changes.

flang/include/flang/ISO_Fortran_binding.h renamed to FortranRuntime/include/flang/Common/ISO_Fortran_binding.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
1-
/*===-- include/flang/ISO_Fortran_binding.h -----------------------*- C++ -*-===
1+
/*===-- include/flang/Common/ISO_Fortran_binding.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 CFI_ISO_FORTRAN_BINDING_H_
11-
#define CFI_ISO_FORTRAN_BINDING_H_
9+
#ifndef FORTRAN_COMMON_ISO_FORTRAN_BINDING_H_
10+
#define FORTRAN_COMMON_ISO_FORTRAN_BINDING_H_
1211

1312
/* When this header is included into the compiler and runtime implementations,
1413
* it does so by means of a wrapper header that establishes namespaces and
1514
* a macro for extra function attributes (RT_API_ATTRS).
1615
*/
17-
#ifndef FORTRAN_ISO_FORTRAN_BINDING_WRAPPER_H_
16+
#ifndef FORTRAN_COMMON_ISO_FORTRAN_BINDING_WRAPPER_H_
1817
#include <stddef.h>
1918
#define FORTRAN_ISO_NAMESPACE_
2019
#endif
@@ -207,4 +206,4 @@ RT_API_ATTRS int CFI_setpointer(
207206
} // extern "C"
208207
#endif
209208

210-
#endif /* CFI_ISO_FORTRAN_BINDING_H_ */
209+
#endif /* FORTRAN_COMMON_ISO_FORTRAN_BINDING_H_ */

flang/include/flang/ISO_Fortran_binding_wrapper.h renamed to FortranRuntime/include/flang/Common/ISO_Fortran_binding_wrapper.h

Lines changed: 6 additions & 7 deletions
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,7 +22,7 @@
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 {
@@ -36,4 +35,4 @@ namespace ISO {
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/api-attrs.h renamed to FortranRuntime/include/flang/Common/api-attrs.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
1-
/*===-- include/flang/Common/api-attrs.h ---------------------------*- C -*-=//
1+
/*===-- include/flang/Common/api-attrs.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

109
/*
1110
* The file defines a set macros that can be used to apply
1211
* different attributes/pragmas to functions/variables
1312
* declared/defined/used in Flang runtime library.
1413
*/
1514

16-
#ifndef FORTRAN_RUNTIME_API_ATTRS_H_
17-
#define FORTRAN_RUNTIME_API_ATTRS_H_
15+
#ifndef FORTRAN_COMMON_API_ATTRS_H_
16+
#define FORTRAN_COMMON_API_ATTRS_H_
1817

1918
/*
2019
* RT_EXT_API_GROUP_BEGIN/END pair is placed around definitions
@@ -178,4 +177,4 @@
178177
#define RT_DEVICE_NOINLINE_HOST_INLINE inline
179178
#endif
180179

181-
#endif /* !FORTRAN_RUNTIME_API_ATTRS_H_ */
180+
#endif /* FORTRAN_COMMON_API_ATTRS_H_ */

flang/include/flang/Decimal/binary-floating-point.h renamed to FortranRuntime/include/flang/Common/binary-floating-point.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
//===-- include/flang/Decimal/binary-floating-point.h -----------*- C++ -*-===//
1+
//===-- include/flang/Common/binary-floating-point.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_DECIMAL_BINARY_FLOATING_POINT_H_
10-
#define FORTRAN_DECIMAL_BINARY_FLOATING_POINT_H_
9+
#ifndef FORTRAN_COMMON_BINARY_FLOATING_POINT_H_
10+
#define FORTRAN_COMMON_BINARY_FLOATING_POINT_H_
1111

1212
// Access and manipulate the fields of an IEEE-754 binary
1313
// floating-point value via a generalized template.
@@ -208,4 +208,4 @@ template <int BINARY_PRECISION> class BinaryFloatingPointNumber {
208208
RawType raw_{0};
209209
};
210210
} // namespace Fortran::decimal
211-
#endif
211+
#endif /* FORTRAN_COMMON_BINARY_FLOATING_POINT_H_ */

flang/include/flang/Common/bit-population-count.h renamed to FortranRuntime/include/flang/Common/bit-population-count.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,4 @@ template <typename INT> inline constexpr int TrailingZeroBitCount(INT x) {
9393
}
9494
}
9595
} // namespace Fortran::common
96-
#endif // FORTRAN_COMMON_BIT_POPULATION_COUNT_H_
96+
#endif /* FORTRAN_COMMON_BIT_POPULATION_COUNT_H_ */

flang/include/flang/Common/constexpr-bitset.h renamed to FortranRuntime/include/flang/Common/constexpr-bitset.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,4 +144,4 @@ template <int BITS> class BitSet {
144144
Word bits_{0};
145145
};
146146
} // namespace Fortran::common
147-
#endif // FORTRAN_COMMON_CONSTEXPR_BITSET_H_
147+
#endif /* FORTRAN_COMMON_CONSTEXPR_BITSET_H_ */

flang/include/flang/Decimal/decimal.h renamed to FortranRuntime/include/flang/Common/decimal.h

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
1-
/*===-- include/flang/Decimal/decimal.h ---------------------------*- C++ -*-===
1+
/*===-- include/flang/Common/decimal.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

109
/* C and C++ API for binary-to/from-decimal conversion package. */
1110

12-
#ifndef FORTRAN_DECIMAL_DECIMAL_H_
13-
#define FORTRAN_DECIMAL_DECIMAL_H_
11+
#ifndef FORTRAN_COMMON_DECIMAL_H_
12+
#define FORTRAN_COMMON_DECIMAL_H_
1413

1514
#include "flang/Common/api-attrs.h"
1615
#include <stddef.h>
@@ -137,4 +136,4 @@ RT_API_ATTRS enum NS(ConversionResultFlags) ConvertDecimalToLongDouble(
137136
#ifdef __cplusplus
138137
} // extern "C"
139138
#endif
140-
#endif
139+
#endif /* FORTRAN_COMMON_DECIMAL_H_ */

0 commit comments

Comments
 (0)