Skip to content

Commit bb06cb0

Browse files
rovkajeanPerier
authored andcommitted
[flang] Add runtime interface for COMMAND_ARGUMENT_COUNT
Differential Revision: https://reviews.llvm.org/D108687
1 parent 2a40e62 commit bb06cb0

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

flang/runtime/command.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
//===-- runtime/command.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+
//===----------------------------------------------------------------------===//
8+
9+
#ifndef FORTRAN_RUNTIME_COMMAND_H_
10+
#define FORTRAN_RUNTIME_COMMAND_H_
11+
12+
#include "cpp-type.h"
13+
#include "entry-names.h"
14+
15+
namespace Fortran::runtime {
16+
extern "C" {
17+
// 16.9.51 COMMAND_ARGUMENT_COUNT
18+
//
19+
// Lowering may need to cast the result to match the precision of the default
20+
// integer kind.
21+
CppTypeFor<TypeCategory::Integer, 4> RTNAME(ArgumentCount)();
22+
}
23+
} // namespace Fortran::runtime
24+
25+
#endif // FORTRAN_RUNTIME_COMMAND_H_

0 commit comments

Comments
 (0)