[flang-commits] [PATCH] D111392: [flang] Add runtime interface for GET_ENVIRONMENT_VARIABLE
Diana Picus via Phabricator via flang-commits
flang-commits at lists.llvm.org
Fri Oct 8 02:43:51 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.
Split into 2 entry points, one for the length and one for the value.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D111392
Files:
flang/include/flang/Runtime/command.h
Index: flang/include/flang/Runtime/command.h
===================================================================
--- flang/include/flang/Runtime/command.h
+++ flang/include/flang/Runtime/command.h
@@ -35,6 +35,19 @@
// Try to get the significant length of the n'th argument.
// Returns 0 if it doesn't manage.
std::int64_t RTNAME(ArgumentLength)(std::int32_t n);
+
+// 16.9.84 GET_ENVIRONMENT_VARIABLE
+// We're breaking up the interface into several different functions, since most
+// of the parameters are optional.
+
+// Try to get the value of the environment variable specified by NAME.
+// Returns a STATUS as described in the standard.
+std::int32_t RTNAME(EnvVariableValue)(const Descriptor &name,
+ const Descriptor *value, bool trim_name, const Descriptor *errmsg);
+
+// Try to get the significant length of the environment variable specified by
+// NAME. Returns 0 if it doesn't manage.
+std::int64_t RTNAME(EnvVariableLength)(const Descriptor &name, bool trim_name);
}
} // namespace Fortran::runtime
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111392.378143.patch
Type: text/x-patch
Size: 1025 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20211008/ad811855/attachment.bin>
More information about the flang-commits
mailing list