From 51db96ad2b39ee365200f3421b75e977395d8b85 Mon Sep 17 00:00:00 2001 From: Alexander Belyaev Date: Tue, 11 Oct 2022 16:26:42 +0200 Subject: [PATCH] [flang] Use the ShapedType::kDynamicSize constant instead of hardcoding it. Differential Revision: https://reviews.llvm.org/D135675 --- flang/include/flang/Optimizer/Dialect/FIRTypes.td | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/flang/include/flang/Optimizer/Dialect/FIRTypes.td b/flang/include/flang/Optimizer/Dialect/FIRTypes.td index 8fc4f53..9d7c76e 100644 --- a/flang/include/flang/Optimizer/Dialect/FIRTypes.td +++ b/flang/include/flang/Optimizer/Dialect/FIRTypes.td @@ -491,8 +491,10 @@ def fir_SequenceType : FIR_Type<"Sequence", "array"> { // Does the sequence have unknown shape? (`array<* x T>`) bool hasUnknownShape() const { return getShape().empty(); } - // The value `-1` represents an unknown extent for a dimension - static constexpr Extent getUnknownExtent() { return -1; } + // The value `kDynamicSize` represents an unknown extent for a dimension + static constexpr Extent getUnknownExtent() { + return mlir::ShapedType::kDynamicSize; + } }]; } -- 2.7.4