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

Diana Picus via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 30 00:42:06 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG4fae60c4b0ed: [flang] Add runtime interface for GET_COMMAND_ARGUMENT (authored by rovka).

Repository:
  rG LLVM Github Monorepo

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.369389.patch
Type: text/x-patch
Size: 1126 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210830/d92616c4/attachment.bin>


More information about the llvm-commits mailing list