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

Jean Perier via Phabricator via flang-commits flang-commits at lists.llvm.org
Fri Aug 27 00:01:04 PDT 2021


jeanPerier added inline comments.


================
Comment at: flang/runtime/environment.h:61
+CppTypeFor<TypeCategory::Integer, 8> RTNAME(ArgumentValue)(
+    CppTypeFor<TypeCategory::Integer, 8> n, Descriptor &value);
+
----------------
Could you make all the `Descriptor&` and `Descriptor*` `const` ? The runtime will modify the value described by the descriptors, but it should not modify the descriptors themselves.

In lowering, `const Descriptor&` and `Descriptor&` do not end-up being handled the same in FIR (because FIR cares if descriptors may be modified in meaningful way by a function), so it's important to make them `const` when they are not intended to be modified by the runtime.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108688



More information about the flang-commits mailing list