[flang] Add runtime interface for GET_COMMAND
authorDiana Picus <diana.picus@linaro.org>
Wed, 26 Jan 2022 09:08:49 +0000 (09:08 +0000)
committerDiana Picus <diana.picus@linaro.org>
Wed, 9 Feb 2022 09:49:03 +0000 (09:49 +0000)
Use a single entry point with several optional parameters.

Differential Revision: https://reviews.llvm.org/D118776

flang/include/flang/Runtime/command.h

index 67d7e7c..f224aa7 100644 (file)
@@ -23,6 +23,13 @@ extern "C" {
 // integer kind.
 std::int32_t RTNAME(ArgumentCount)();
 
+// 16.9.82 GET_COMMAND
+// Try to get the value of the whole command. All of the parameters are
+// optional.
+// Return a STATUS as described in the standard.
+std::int32_t RTNAME(GetCommand)(const Descriptor *command = nullptr,
+    const Descriptor *length = nullptr, const Descriptor *errmsg = nullptr);
+
 // 16.9.83 GET_COMMAND_ARGUMENT
 // We're breaking up the interface into several different functions, since most
 // of the parameters are optional.