[flang-commits] [flang] [flang] improve Entity::hasNonDefaultLowerBounds (PR #93848)

Slava Zakharin via flang-commits flang-commits at lists.llvm.org
Thu May 30 10:58:36 PDT 2024


================
@@ -195,6 +195,29 @@ mlir::Value hlfir::Entity::getFirBase() const {
   return getBase();
 }
 
+static bool isShapeWithLowerBounds(mlir::Value shape) {
+  if (!shape)
+    return false;
+  auto shapeTy = shape.getType();
+  return mlir::isa<fir::ShiftType>(shapeTy) ||
+         mlir::isa<fir::ShapeShiftType>(shapeTy);
+}
+
+bool hlfir::Entity::hasNonDefaultLowerBounds() const {
----------------
vzakhari wrote:

nit: `mayHaveNonDefaultLowerBounds` may be a little bit better name.

https://github.com/llvm/llvm-project/pull/93848


More information about the flang-commits mailing list