[flang-commits] [PATCH] D108688: [flang] Add runtime interface for GET_COMMAND_ARGUMENT

Diana Picus via Phabricator via flang-commits flang-commits at lists.llvm.org
Fri Aug 27 03:13:09 PDT 2021


rovka updated this revision to Diff 369057.
rovka edited the summary of this revision.
rovka added a comment.

Addressed review comments:

- Moved everything to command.h.
- s/Descriptor &/const Descriptor */
- Removed ArgumentValueVerbose entry point.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108688/new/

https://reviews.llvm.org/D108688

Files:
  flang/runtime/command.h


Index: flang/runtime/command.h
===================================================================
--- flang/runtime/command.h
+++ flang/runtime/command.h
@@ -13,12 +13,29 @@
 #include "entry-names.h"
 
 namespace Fortran::runtime {
+class Descriptor;
+
 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)();
+
+// 16.9.83 GET_COMMAND_ARGUMENT
+// We're breaking up the interface into several different functions, since most
+// of the parameters are optional.
+
+// Try to get the value of the n'th argument.
+// Returns a STATUS as described in the standard.
+CppTypeFor<TypeCategory::Integer, 4> RTNAME(ArgumentValue)(
+    CppTypeFor<TypeCategory::Integer, 4> n, const Descriptor *value,
+    const Descriptor *errmsg);
+
+// Try to get the significant length of the n'th argument.
+// Returns 0 if it doesn't manage.
+CppTypeFor<TypeCategory::Integer, 4> RTNAME(ArgumentLength)(
+    CppTypeFor<TypeCategory::Integer, 4> n);
 }
 } // namespace Fortran::runtime
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108688.369057.patch
Type: text/x-patch
Size: 1126 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20210827/a1ce076e/attachment.bin>


More information about the flang-commits mailing list