Warning: This file is not a C or C++ file. It does not have highlighting.

1//===-- Lower/IO.h -- lower IO statements -----------------------*- 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//===----------------------------------------------------------------------===//
8//
9// Coding style: https://mlir.llvm.org/getting_started/DeveloperGuide/
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef FORTRAN_LOWER_IO_H
14#define FORTRAN_LOWER_IO_H
15
16namespace mlir {
17class Value;
18} // namespace mlir
19
20namespace Fortran {
21namespace parser {
22struct BackspaceStmt;
23struct CloseStmt;
24struct EndfileStmt;
25struct FlushStmt;
26struct InquireStmt;
27struct OpenStmt;
28struct ReadStmt;
29struct RewindStmt;
30struct PrintStmt;
31struct WaitStmt;
32struct WriteStmt;
33} // namespace parser
34
35namespace lower {
36
37class AbstractConverter;
38
39/// Generate IO call(s) for BACKSPACE; return the IOSTAT code
40mlir::Value genBackspaceStatement(AbstractConverter &,
41 const parser::BackspaceStmt &);
42
43/// Generate IO call(s) for CLOSE; return the IOSTAT code
44mlir::Value genCloseStatement(AbstractConverter &, const parser::CloseStmt &);
45
46/// Generate IO call(s) for ENDFILE; return the IOSTAT code
47mlir::Value genEndfileStatement(AbstractConverter &,
48 const parser::EndfileStmt &);
49
50/// Generate IO call(s) for FLUSH; return the IOSTAT code
51mlir::Value genFlushStatement(AbstractConverter &, const parser::FlushStmt &);
52
53/// Generate IO call(s) for INQUIRE; return the IOSTAT code
54mlir::Value genInquireStatement(AbstractConverter &,
55 const parser::InquireStmt &);
56
57/// Generate IO call(s) for READ; return the IOSTAT code
58mlir::Value genReadStatement(AbstractConverter &converter,
59 const parser::ReadStmt &stmt);
60
61/// Generate IO call(s) for OPEN; return the IOSTAT code
62mlir::Value genOpenStatement(AbstractConverter &, const parser::OpenStmt &);
63
64/// Generate IO call(s) for PRINT
65void genPrintStatement(AbstractConverter &converter,
66 const parser::PrintStmt &stmt);
67
68/// Generate IO call(s) for REWIND; return the IOSTAT code
69mlir::Value genRewindStatement(AbstractConverter &, const parser::RewindStmt &);
70
71/// Generate IO call(s) for WAIT; return the IOSTAT code
72mlir::Value genWaitStatement(AbstractConverter &, const parser::WaitStmt &);
73
74/// Generate IO call(s) for WRITE; return the IOSTAT code
75mlir::Value genWriteStatement(AbstractConverter &converter,
76 const parser::WriteStmt &stmt);
77
78} // namespace lower
79} // namespace Fortran
80
81#endif // FORTRAN_LOWER_IO_H
82

Warning: This file is not a C or C++ file. It does not have highlighting.

source code of flang/include/flang/Lower/IO.h