From cc4d28691bbc382aabf2a59c017b55a6c37f1b18 Mon Sep 17 00:00:00 2001 From: Diana Picus Date: Wed, 25 Aug 2021 03:16:30 +0000 Subject: [PATCH] [flang] Add runtime interface for COMMAND_ARGUMENT_COUNT Differential Revision: https://reviews.llvm.org/D108687 --- flang/runtime/command.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 flang/runtime/command.h diff --git a/flang/runtime/command.h b/flang/runtime/command.h new file mode 100644 index 0000000..a2e23fc --- /dev/null +++ b/flang/runtime/command.h @@ -0,0 +1,25 @@ +//===-- runtime/command.h ---------------------------------------*- C++ -*-===// +// +// 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 +// +//===----------------------------------------------------------------------===// + +#ifndef FORTRAN_RUNTIME_COMMAND_H_ +#define FORTRAN_RUNTIME_COMMAND_H_ + +#include "cpp-type.h" +#include "entry-names.h" + +namespace Fortran::runtime { +extern "C" { +// 16.9.51 COMMAND_ARGUMENT_COUNT +// +// Lowering may need to cast the result to match the precision of the default +// integer kind. +CppTypeFor RTNAME(ArgumentCount)(); +} +} // namespace Fortran::runtime + +#endif // FORTRAN_RUNTIME_COMMAND_H_ -- 2.7.4