Skip to content

Commit 85f28cf

Browse files
authored
[flang] Fixed -g compilation issues caused by #90484. (#90683)
1 parent 0f628fd commit 85f28cf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

flang/lib/Optimizer/Transforms/DebugTypeGenerator.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,13 @@ 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 (mlir::isa<mlir::FloatType>(Ty) || mlir::isa<fir::RealType>(Ty)) {
48+
} else if (mlir::isa<mlir::FloatType>(Ty)) {
4949
return genBasicType(context, mlir::StringAttr::get(context, "real"),
5050
Ty.getIntOrFloatBitWidth(), llvm::dwarf::DW_ATE_float);
51+
} else if (auto realTy = mlir::dyn_cast_or_null<fir::RealType>(Ty)) {
52+
return genBasicType(context, mlir::StringAttr::get(context, "real"),
53+
kindMapping.getRealBitsize(realTy.getFKind()),
54+
llvm::dwarf::DW_ATE_float);
5155
} else if (auto logTy = mlir::dyn_cast_or_null<fir::LogicalType>(Ty)) {
5256
return genBasicType(context,
5357
mlir::StringAttr::get(context, logTy.getMnemonic()),

0 commit comments

Comments
 (0)