@@ -78,7 +78,7 @@ class CharBoxValue : public AbstractBox {
78
78
public:
79
79
CharBoxValue (mlir::Value addr, mlir::Value len)
80
80
: AbstractBox{addr}, len{len} {
81
- if (addr && addr. getType (). template isa <fir::BoxCharType>())
81
+ if (addr && mlir:: isa<fir::BoxCharType>(addr. getType () ))
82
82
fir::emitFatalError (addr.getLoc (),
83
83
" BoxChar should not be in CharBoxValue" );
84
84
}
@@ -221,7 +221,7 @@ class AbstractIrBox : public AbstractBox, public AbstractArrayBox {
221
221
auto type = getAddr ().getType ();
222
222
if (auto pointedTy = fir::dyn_cast_ptrEleTy (type))
223
223
type = pointedTy;
224
- return type. cast <fir::BaseBoxType>();
224
+ return mlir:: cast<fir::BaseBoxType>(type );
225
225
}
226
226
// / Return the part of the address type after memory and box types. That is
227
227
// / the element type, maybe wrapped in a fir.array type.
@@ -243,22 +243,22 @@ class AbstractIrBox : public AbstractBox, public AbstractArrayBox {
243
243
// / Get the scalar type related to the described entity
244
244
mlir::Type getEleTy () const {
245
245
auto type = getBaseTy ();
246
- if (auto seqTy = type. dyn_cast <fir::SequenceType>())
246
+ if (auto seqTy = mlir:: dyn_cast<fir::SequenceType>(type ))
247
247
return seqTy.getEleTy ();
248
248
return type;
249
249
}
250
250
251
251
// / 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 () ); }
253
253
// / Is this an assumed rank ?
254
254
bool hasAssumedRank () const {
255
- auto seqTy = getBaseTy (). dyn_cast <fir::SequenceType>();
255
+ auto seqTy = mlir:: dyn_cast<fir::SequenceType>(getBaseTy () );
256
256
return seqTy && seqTy.hasUnknownShape ();
257
257
}
258
258
// / Returns the rank of the entity. Beware that zero will be returned for
259
259
// / both scalars and assumed rank.
260
260
unsigned rank () const {
261
- if (auto seqTy = getBaseTy (). dyn_cast <fir::SequenceType>())
261
+ if (auto seqTy = mlir:: dyn_cast<fir::SequenceType>(getBaseTy () ))
262
262
return seqTy.getDimension ();
263
263
return 0 ;
264
264
}
@@ -267,7 +267,7 @@ class AbstractIrBox : public AbstractBox, public AbstractArrayBox {
267
267
bool isCharacter () const { return fir::isa_char (getEleTy ()); }
268
268
269
269
// / 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 () ); }
271
271
272
272
bool isDerivedWithLenParameters () const {
273
273
return fir::isRecordWithTypeParameters (getEleTy ());
@@ -377,11 +377,11 @@ class MutableBoxValue : public AbstractIrBox {
377
377
}
378
378
// / Is this a Fortran pointer ?
379
379
bool isPointer () const {
380
- return getBoxTy (). getEleTy (). isa <fir::PointerType>();
380
+ return mlir:: isa<fir::PointerType>(getBoxTy (). getEleTy () );
381
381
}
382
382
// / Is this an allocatable ?
383
383
bool isAllocatable () const {
384
- return getBoxTy (). getEleTy (). isa <fir::HeapType>();
384
+ return mlir:: isa<fir::HeapType>(getBoxTy (). getEleTy () );
385
385
}
386
386
// Replace the fir.ref<fir.box>, keeping any non-deferred parameters.
387
387
MutableBoxValue clone (mlir::Value newBox) const {
@@ -488,7 +488,7 @@ class ExtendedValue : public details::matcher<ExtendedValue> {
488
488
if (const auto *b = getUnboxed ()) {
489
489
if (*b) {
490
490
auto type = b->getType ();
491
- if (type. template isa <fir::BoxCharType>())
491
+ if (mlir:: isa<fir::BoxCharType>(type ))
492
492
fir::emitFatalError (b->getLoc (), " BoxChar should be unboxed" );
493
493
type = fir::unwrapSequenceType (fir::unwrapRefType (type));
494
494
if (fir::isa_char (type))
0 commit comments