[libc++][Android] Allow testing libc++ with clang-r536225 (#116149)
[llvm-project.git] / flang / runtime / edit-input.h
bloba90180b8ee2ebd5c57a8d0556fade7cc1bc2535d
1 //===-- runtime/edit-input.h ------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #ifndef FORTRAN_RUNTIME_EDIT_INPUT_H_
10 #define FORTRAN_RUNTIME_EDIT_INPUT_H_
12 #include "format.h"
13 #include "io-stmt.h"
14 #include "flang/Decimal/decimal.h"
16 namespace Fortran::runtime::io {
18 RT_API_ATTRS bool EditIntegerInput(
19 IoStatementState &, const DataEdit &, void *, int kind);
21 template <int KIND>
22 RT_API_ATTRS bool EditRealInput(IoStatementState &, const DataEdit &, void *);
24 RT_API_ATTRS bool EditLogicalInput(
25 IoStatementState &, const DataEdit &, bool &);
27 template <typename CHAR>
28 RT_API_ATTRS bool EditCharacterInput(
29 IoStatementState &, const DataEdit &, CHAR *, std::size_t);
31 extern template RT_API_ATTRS bool EditRealInput<2>(
32 IoStatementState &, const DataEdit &, void *);
33 extern template RT_API_ATTRS bool EditRealInput<3>(
34 IoStatementState &, const DataEdit &, void *);
35 extern template RT_API_ATTRS bool EditRealInput<4>(
36 IoStatementState &, const DataEdit &, void *);
37 extern template RT_API_ATTRS bool EditRealInput<8>(
38 IoStatementState &, const DataEdit &, void *);
39 extern template RT_API_ATTRS bool EditRealInput<10>(
40 IoStatementState &, const DataEdit &, void *);
41 // TODO: double/double
42 extern template RT_API_ATTRS bool EditRealInput<16>(
43 IoStatementState &, const DataEdit &, void *);
45 extern template RT_API_ATTRS bool EditCharacterInput(
46 IoStatementState &, const DataEdit &, char *, std::size_t);
47 extern template RT_API_ATTRS bool EditCharacterInput(
48 IoStatementState &, const DataEdit &, char16_t *, std::size_t);
49 extern template RT_API_ATTRS bool EditCharacterInput(
50 IoStatementState &, const DataEdit &, char32_t *, std::size_t);
52 } // namespace Fortran::runtime::io
53 #endif // FORTRAN_RUNTIME_EDIT_INPUT_H_