[flang-commits] [PATCH] D136151: [flang] Introduce FortranVariableOpInterface for ops creating variable

Jean Perier via Phabricator via flang-commits flang-commits at lists.llvm.org
Tue Oct 18 23:54:20 PDT 2022


jeanPerier added inline comments.


================
Comment at: flang/include/flang/Optimizer/Dialect/FortranVariableInterface.td:111
+    bool hasExplicitCharLen() {
+      return isCharacter() && !getExplicitTypeParams().empty();
+    }
----------------
vzakhari wrote:
> Is it worth asserting that `getExplicitTypeParams` returns an empty range or a range with exactly one element, when `isCharacter` is true?
Yes, this will actually be done in the  FortranVariableOpInterface verifier that I am adding in https://reviews.llvm.org/D136181 (see fir::FortranVariableOpInterface::verifyImpl) (it won't be an assertion though, but an MLIR verifier error with line location).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136151



More information about the flang-commits mailing list