[flang-commits] [PATCH] D112698: [flang] Implement GET_ENVIRONMENT_VARIABLE(VALUE)

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Thu Oct 28 12:07:12 PDT 2021


klausler added inline comments.


================
Comment at: flang/include/flang/ISO_Fortran_binding.h:87
 
 /* Error code macros */
 #define CFI_SUCCESS 0 /* must be zero */
----------------
Please add a comment that explains why the error code numbers now start where they do.



================
Comment at: flang/runtime/command.cpp:61
+    const Descriptor *errmsg) {
+  assert(IsValidCharDescriptor(&value) && "Bad descriptor");
+  std::int64_t toCopy{std::min(
----------------
Please use RUNTIME_CHECK, not assert.


================
Comment at: flang/runtime/command.cpp:84
   if (IsValidCharDescriptor(value)) {
-    std::int64_t argLen{ArgumentLength(n)};
+    const char *arg = executionEnvironment.argv[n];
+    std::int64_t argLen{StringLength(arg)};
----------------
Please use braces for initializers.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112698



More information about the flang-commits mailing list