mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-20 10:07:02 +00:00

Prior to the introduction of the FLUSH statement in Fortran 2003, implementations provided a FLUSH subroutine. We can't yet put Fortran code into the runtime, so this subroutine is in C++ with a Fortran-mangled entry point name. Differential Revision: https://reviews.llvm.org/D115289
27 lines
876 B
C++
27 lines
876 B
C++
//===-- runtime/extensions.cpp --------------------------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// These C-coded entry points with Fortran-mangled names implement legacy
|
|
// extensions that will eventually be implemented in Fortran.
|
|
|
|
#include "flang/Runtime/extensions.h"
|
|
#include "flang/Runtime/io-api.h"
|
|
|
|
extern "C" {
|
|
|
|
// SUBROUTINE FLUSH(N)
|
|
// FLUSH N
|
|
// END
|
|
namespace Fortran::runtime::io {
|
|
void FORTRAN_SUBROUTINE_NAME(flush)(const int &unit) {
|
|
Cookie cookie{IONAME(BeginFlush)(unit, __FILE__, __LINE__)};
|
|
IONAME(EndIoStatement)(cookie);
|
|
}
|
|
} // namespace Fortran::runtime::io
|
|
} // extern "C"
|