[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
Wed Aug 25 00:38:59 PDT 2021
rovka created this revision.
rovka added reviewers: klausler, jeanPerier.
rovka added a project: Flang.
Herald added a subscriber: jdoerfert.
rovka requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D108687
Files:
flang/runtime/environment.h
Index: flang/runtime/environment.h
===================================================================
--- flang/runtime/environment.h
+++ flang/runtime/environment.h
@@ -9,6 +9,8 @@
#ifndef FORTRAN_RUNTIME_ENVIRONMENT_H_
#define FORTRAN_RUNTIME_ENVIRONMENT_H_
+#include "cpp-type.h"
+#include "entry-names.h"
#include "flang/Decimal/decimal.h"
#include <optional>
@@ -38,6 +40,14 @@
Convert conversion;
};
extern ExecutionEnvironment executionEnvironment;
+
+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, 8> RTNAME(ArgumentCount)();
+}
} // namespace Fortran::runtime
#endif // FORTRAN_RUNTIME_ENVIRONMENT_H_
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108687.368567.patch
Type: text/x-patch
Size: 765 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20210825/0bd19a99/attachment.bin>
More information about the flang-commits
mailing list