[CMake] Remove custom ccache CMake logic
[llvm-project.git] / flang / runtime / namelist.h
blobbe40310cb0e00c9dda24b04137c0121ace85f47a
1 //===-- runtime/namelist.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 // Defines the data structure used for NAMELIST I/O
11 #ifndef FORTRAN_RUNTIME_NAMELIST_H_
12 #define FORTRAN_RUNTIME_NAMELIST_H_
14 #include <cstddef>
16 namespace Fortran::runtime {
17 class Descriptor;
18 class IoStatementState;
19 } // namespace Fortran::runtime
21 namespace Fortran::runtime::io {
23 // A NAMELIST group is a named ordered collection of distinct variable names.
24 // It is packaged by lowering into an instance of this class.
25 // If all the items are variables with fixed addresses, the NAMELIST group
26 // description can be in a read-only section.
27 class NamelistGroup {
28 public:
29 struct Item {
30 const char *name; // NUL-terminated lower-case
31 const Descriptor &descriptor;
33 const char *groupName; // NUL-terminated lower-case
34 std::size_t items;
35 const Item *item; // in original declaration order
38 // Look ahead on input for a '/' or an identifier followed by a '=', '(', or '%'
39 // character; for use in disambiguating a name-like value (e.g. F or T) from a
40 // NAMELIST group item name and for coping with short arrays. Always false
41 // when not reading a NAMELIST.
42 bool IsNamelistNameOrSlash(IoStatementState &);
44 } // namespace Fortran::runtime::io
45 #endif // FORTRAN_RUNTIME_NAMELIST_H_