@@ -78,7 +78,7 @@ class CharBoxValue : public AbstractBox {
7878public:
7979 CharBoxValue (mlir::Value addr, mlir::Value len)
8080 : AbstractBox{addr}, len{len} {
81- if (addr && addr. getType (). template isa <fir::BoxCharType>())
81+ if (addr && mlir:: isa<fir::BoxCharType>(addr. getType () ))
8282 fir::emitFatalError (addr.getLoc (),
8383 " BoxChar should not be in CharBoxValue" );
8484 }
@@ -221,7 +221,7 @@ class AbstractIrBox : public AbstractBox, public AbstractArrayBox {
221221 auto type = getAddr ().getType ();
222222 if (auto pointedTy = fir::dyn_cast_ptrEleTy (type))
223223 type = pointedTy;
224- return type. cast <fir::BaseBoxType>();
224+ return mlir:: cast<fir::BaseBoxType>(type );
225225 }
226226 // / Return the part of the address type after memory and box types. That is
227227 // / the element type, maybe wrapped in a fir.array type.
@@ -243,22 +243,22 @@ class AbstractIrBox : public AbstractBox, public AbstractArrayBox {
243243 // / Get the scalar type related to the described entity
244244 mlir::Type getEleTy () const {
245245 auto type = getBaseTy ();
246- if (auto seqTy = type. dyn_cast <fir::SequenceType>())
246+ if (auto seqTy = mlir:: dyn_cast<fir::SequenceType>(type ))
247247 return seqTy.getEleTy ();
248248 return type;
249249 }
250250
251251 // / Is the entity an array or an assumed rank ?
252- bool hasRank () const { return getBaseTy (). isa <fir::SequenceType>(); }
252+ bool hasRank () const { return mlir:: isa<fir::SequenceType>(getBaseTy () ); }
253253 // / Is this an assumed rank ?
254254 bool hasAssumedRank () const {
255- auto seqTy = getBaseTy (). dyn_cast <fir::SequenceType>();
255+ auto seqTy = mlir:: dyn_cast<fir::SequenceType>(getBaseTy () );
256256 return seqTy && seqTy.hasUnknownShape ();
257257 }
258258 // / Returns the rank of the entity. Beware that zero will be returned for
259259 // / both scalars and assumed rank.
260260 unsigned rank () const {
261- if (auto seqTy = getBaseTy (). dyn_cast <fir::SequenceType>())
261+ if (auto seqTy = mlir:: dyn_cast<fir::SequenceType>(getBaseTy () ))
262262 return seqTy.getDimension ();
263263 return 0 ;
264264 }
@@ -267,7 +267,7 @@ class AbstractIrBox : public AbstractBox, public AbstractArrayBox {
267267 bool isCharacter () const { return fir::isa_char (getEleTy ()); }
268268
269269 // / Is this a derived type entity ?
270- bool isDerived () const { return getEleTy (). isa <fir::RecordType>(); }
270+ bool isDerived () const { return mlir:: isa<fir::RecordType>(getEleTy () ); }
271271
272272 bool isDerivedWithLenParameters () const {
273273 return fir::isRecordWithTypeParameters (getEleTy ());
@@ -377,11 +377,11 @@ class MutableBoxValue : public AbstractIrBox {
377377 }
378378 // / Is this a Fortran pointer ?
379379 bool isPointer () const {
380- return getBoxTy (). getEleTy (). isa <fir::PointerType>();
380+ return mlir:: isa<fir::PointerType>(getBoxTy (). getEleTy () );
381381 }
382382 // / Is this an allocatable ?
383383 bool isAllocatable () const {
384- return getBoxTy (). getEleTy (). isa <fir::HeapType>();
384+ return mlir:: isa<fir::HeapType>(getBoxTy (). getEleTy () );
385385 }
386386 // Replace the fir.ref<fir.box>, keeping any non-deferred parameters.
387387 MutableBoxValue clone (mlir::Value newBox) const {
@@ -488,7 +488,7 @@ class ExtendedValue : public details::matcher<ExtendedValue> {
488488 if (const auto *b = getUnboxed ()) {
489489 if (*b) {
490490 auto type = b->getType ();
491- if (type. template isa <fir::BoxCharType>())
491+ if (mlir:: isa<fir::BoxCharType>(type ))
492492 fir::emitFatalError (b->getLoc (), " BoxChar should be unboxed" );
493493 type = fir::unwrapSequenceType (fir::unwrapRefType (type));
494494 if (fir::isa_char (type))
0 commit comments