Skip to content

Commit aeb94e5

Browse files
committed
Fix a regression.
The initial PR llvm#90083 was reverted as it caused the regression in one of the gfortran tests. This commit fixes this issue by replacing isIntOrIndex with isInteger which is the right function to check for integer type.
1 parent 0450758 commit aeb94e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flang/lib/Optimizer/Transforms/DebugTypeGenerator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ DebugTypeGenerator::convertType(mlir::Type Ty, mlir::LLVM::DIFileAttr fileAttr,
4242
mlir::LLVM::DIScopeAttr scope,
4343
mlir::Location loc) {
4444
mlir::MLIRContext *context = module.getContext();
45-
if (Ty.isIntOrIndex()) {
45+
if (Ty.isInteger()) {
4646
return genBasicType(context, mlir::StringAttr::get(context, "integer"),
4747
Ty.getIntOrFloatBitWidth(), llvm::dwarf::DW_ATE_signed);
4848
} else if (Ty.isa<mlir::FloatType>() || Ty.isa<fir::RealType>()) {

0 commit comments

Comments
 (0)