Skip to content

Commit

Permalink
[flang] Fixed -g compilation issues caused by #90484. (#90683)
Browse files Browse the repository at this point in the history
  • Loading branch information
vzakhari committed Apr 30, 2024
1 parent 0f628fd commit 85f28cf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion flang/lib/Optimizer/Transforms/DebugTypeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,13 @@ DebugTypeGenerator::convertType(mlir::Type Ty, mlir::LLVM::DIFileAttr fileAttr,
if (Ty.isInteger()) {
return genBasicType(context, mlir::StringAttr::get(context, "integer"),
Ty.getIntOrFloatBitWidth(), llvm::dwarf::DW_ATE_signed);
} else if (mlir::isa<mlir::FloatType>(Ty) || mlir::isa<fir::RealType>(Ty)) {
} else if (mlir::isa<mlir::FloatType>(Ty)) {
return genBasicType(context, mlir::StringAttr::get(context, "real"),
Ty.getIntOrFloatBitWidth(), llvm::dwarf::DW_ATE_float);
} else if (auto realTy = mlir::dyn_cast_or_null<fir::RealType>(Ty)) {
return genBasicType(context, mlir::StringAttr::get(context, "real"),
kindMapping.getRealBitsize(realTy.getFKind()),
llvm::dwarf::DW_ATE_float);
} else if (auto logTy = mlir::dyn_cast_or_null<fir::LogicalType>(Ty)) {
return genBasicType(context,
mlir::StringAttr::get(context, logTy.getMnemonic()),
Expand Down

0 comments on commit 85f28cf

Please sign in to comment.