1 //===-- runtime/extensions.cpp --------------------------------------------===//
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 // These C-coded entry points with Fortran-mangled names implement legacy
10 // extensions that will eventually be implemented in Fortran.
11 
12 #include "flang/Runtime/extensions.h"
13 #include "flang/Runtime/io-api.h"
14 
15 extern "C" {
16 
17 // SUBROUTINE FLUSH(N)
18 //   FLUSH N
19 // END
20 namespace Fortran::runtime::io {
FORTRAN_SUBROUTINE_NAME(flush)21 void FORTRAN_SUBROUTINE_NAME(flush)(const int &unit) {
22   Cookie cookie{IONAME(BeginFlush)(unit, __FILE__, __LINE__)};
23   IONAME(EndIoStatement)(cookie);
24 }
25 } // namespace Fortran::runtime::io
26 } // extern "C"
27