Skip to content

Commit 52cb953

Browse files
[flang] Update calls to isa/dyn_cast/dyn_cast_or_null
1 parent 7cbaaed commit 52cb953

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

flang/lib/Optimizer/Transforms/AddDebugInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ void AddDebugInfoPass::runOnOperation() {
145145
subprogramFlags | mlir::LLVM::DISubprogramFlags::Definition;
146146
}
147147
unsigned line = 1;
148-
if (auto funcLoc = l.dyn_cast<mlir::FileLineColLoc>())
148+
if (auto funcLoc = mlir::dyn_cast<mlir::FileLineColLoc>(l))
149149
line = funcLoc.getLine();
150150

151151
auto spAttr = mlir::LLVM::DISubprogramAttr::get(

flang/lib/Optimizer/Transforms/DebugTypeGenerator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ DebugTypeGenerator::convertType(mlir::Type Ty, mlir::LLVM::DIFileAttr fileAttr,
4545
if (Ty.isInteger()) {
4646
return genBasicType(context, mlir::StringAttr::get(context, "integer"),
4747
Ty.getIntOrFloatBitWidth(), llvm::dwarf::DW_ATE_signed);
48-
} else if (Ty.isa<mlir::FloatType>() || Ty.isa<fir::RealType>()) {
48+
} else if (mlir::isa<mlir::FloatType>(Ty) || mlir::isa<fir::RealType>(Ty)) {
4949
return genBasicType(context, mlir::StringAttr::get(context, "real"),
5050
Ty.getIntOrFloatBitWidth(), llvm::dwarf::DW_ATE_float);
51-
} else if (auto logTy = Ty.dyn_cast_or_null<fir::LogicalType>()) {
51+
} else if (auto logTy = mlir::dyn_cast_or_null<fir::LogicalType>(Ty)) {
5252
return genBasicType(context,
5353
mlir::StringAttr::get(context, logTy.getMnemonic()),
5454
kindMapping.getLogicalBitsize(logTy.getFKind()),

0 commit comments

Comments
 (0)