[flang-commits] [flang] [flang] get rid of descriptor in scalar type is (PR #188762)

Eugene Epshteyn via flang-commits flang-commits at lists.llvm.org
Thu Mar 26 08:10:05 PDT 2026


================
@@ -4634,10 +4630,8 @@ class FirConverter : public Fortran::lower::AbstractConverter {
         };
 
         mlir::Type baseTy = fir::getBase(selector).getType();
-        bool isPointer = fir::isPointerType(baseTy);
-        bool isAllocatable = fir::isAllocatableType(baseTy);
-        bool isArray =
-            mlir::isa<fir::SequenceType>(fir::dyn_cast_ptrOrBoxEleTy(baseTy));
+        auto selectorBoxType = llvm::cast<fir::BaseBoxType>(baseTy);
+        bool isArray = selectorBoxType.isArray();
----------------
eugeneepshteyn wrote:

Maybe `const bool isArray`.

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


More information about the flang-commits mailing list