Skip to content

Commit

Permalink
Fix a regression.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
abidh committed Apr 30, 2024
1 parent f639f91 commit cd5746c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flang/lib/Optimizer/Transforms/DebugTypeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ DebugTypeGenerator::convertType(mlir::Type Ty, mlir::LLVM::DIFileAttr fileAttr,
mlir::LLVM::DIScopeAttr scope,
mlir::Location loc) {
mlir::MLIRContext *context = module.getContext();
if (Ty.isIntOrIndex()) {
if (Ty.isInteger()) {
return genBasicType(context, mlir::StringAttr::get(context, "integer"),
Ty.getIntOrFloatBitWidth(), llvm::dwarf::DW_ATE_signed);
} else if (Ty.isa<mlir::FloatType>() || Ty.isa<fir::RealType>()) {
Expand Down

0 comments on commit cd5746c

Please sign in to comment.