Skip to content

Commit 9af78b5

Browse files
committed
Merge branch 'users/meinersbur/flang_runtime_FortranSupport' into users/meinersbur/flang_runtime_move-files
2 parents f9a732e + baa7cb1 commit 9af78b5

31 files changed

+40
-52
lines changed

flang-rt/lib/flang_rt/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ add_definitions(-U_LIBCPP_ENABLE_ASSERTIONS)
113113
add_subdirectory(../FortranFloat128Math Float128Math)
114114

115115
set(sources
116-
${FLANG_SOURCE_DIR}/lib/Common/binary-to-decimal.cpp
117-
${FLANG_SOURCE_DIR}/lib/Common/decimal-to-binary.cpp
116+
${FLANG_SOURCE_DIR}/lib/Decimal/binary-to-decimal.cpp
117+
${FLANG_SOURCE_DIR}/lib/Decimal/decimal-to-binary.cpp
118118
ISO_Fortran_binding.cpp
119119
allocator-registry.cpp
120120
allocatable.cpp

flang-rt/lib/flang_rt/edit-input.h

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

1212
#include "format.h"
1313
#include "io-stmt.h"
14-
#include "flang/Common/decimal.h"
14+
#include "flang/Decimal/decimal.h"
1515

1616
namespace Fortran::runtime::io {
1717

flang-rt/lib/flang_rt/edit-output.h

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

2121
#include "format.h"
2222
#include "io-stmt.h"
23-
#include "flang/Common/decimal.h"
2423
#include "flang/Common/uint128.h"
24+
#include "flang/Decimal/decimal.h"
2525

2626
namespace Fortran::runtime::io {
2727

flang-rt/lib/flang_rt/environment.h

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

12-
#include "flang/Common/decimal.h"
1312
#include "flang/Common/optional.h"
13+
#include "flang/Decimal/decimal.h"
1414

1515
struct EnvironmentDefaultList;
1616

flang-rt/lib/flang_rt/format-implementation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
#include "format.h"
1616
#include "io-stmt.h"
1717
#include "memory.h"
18-
#include "flang/Common/decimal.h"
1918
#include "flang/Common/format.h"
19+
#include "flang/Decimal/decimal.h"
2020
#include "flang/Runtime/main.h"
2121
#include <algorithm>
2222
#include <cstring>

flang-rt/lib/flang_rt/format.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
#include "environment.h"
1515
#include "io-error.h"
1616
#include "flang/Common/Fortran-consts.h"
17-
#include "flang/Common/decimal.h"
1817
#include "flang/Common/optional.h"
18+
#include "flang/Decimal/decimal.h"
1919
#include "flang/Runtime/freestanding-tools.h"
2020
#include <cinttypes>
2121

flang/include/flang/Common/binary-floating-point.h renamed to flang/include/flang/Decimal/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/Common/binary-floating-point.h ------------*- C++ -*-===//
1+
//===-- include/flang/Decimal/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_COMMON_BINARY_FLOATING_POINT_H_
10-
#define FORTRAN_COMMON_BINARY_FLOATING_POINT_H_
9+
#ifndef FORTRAN_DECIMAL_BINARY_FLOATING_POINT_H_
10+
#define FORTRAN_DECIMAL_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 /* FORTRAN_COMMON_BINARY_FLOATING_POINT_H_ */
211+
#endif

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

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

910
/* C and C++ API for binary-to/from-decimal conversion package. */
1011

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

1415
#include "flang/Common/api-attrs.h"
1516
#include <stddef.h>
@@ -136,4 +137,4 @@ RT_API_ATTRS enum NS(ConversionResultFlags) ConvertDecimalToLongDouble(
136137
#ifdef __cplusplus
137138
} // extern "C"
138139
#endif
139-
#endif /* FORTRAN_COMMON_DECIMAL_H_ */
140+
#endif

flang/lib/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
add_subdirectory(Common)
21
add_subdirectory(Support)
32
add_subdirectory(Evaluate)
3+
add_subdirectory(Decimal)
44
add_subdirectory(Lower)
55
add_subdirectory(Parser)
66
add_subdirectory(Semantics)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
#===-- lib/Common/CMakeLists.txt ------------------------------------===#
1+
#===-- lib/Decimal/CMakeLists.txt ------------------------------------------===#
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-
add_flang_library(FortranCommon
9+
add_flang_library(FortranDecimal
1010
binary-to-decimal.cpp
1111
decimal-to-binary.cpp
1212
)

0 commit comments

Comments
 (0)