[flang-commits] [PATCH] D108687: [flang] Add runtime interface for COMMAND_ARGUMENT_COUNT
Diana Picus via Phabricator via flang-commits
flang-commits at lists.llvm.org
Fri Aug 27 03:08:15 PDT 2021
rovka updated this revision to Diff 369054.
rovka added a comment.
Addressed review comments.
In the end I created a new file, command.h, because main.h is in the c-or-cpp style and I'm not sure it's a good idea to touch it. I don't mind hearing otherwise though :)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108687/new/
https://reviews.llvm.org/D108687
Files:
flang/runtime/command.h
Index: flang/runtime/command.h
===================================================================
--- /dev/null
+++ 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<TypeCategory::Integer, 4> RTNAME(ArgumentCount)();
+}
+} // namespace Fortran::runtime
+
+#endif // FORTRAN_RUNTIME_COMMAND_H_
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108687.369054.patch
Type: text/x-patch
Size: 980 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20210827/2dd0ee87/attachment.bin>
More information about the flang-commits
mailing list