Skip to content

Commit fe75d2c

Browse files
committed
Handle review comments.
Dont special case ClassTyp but handle it like a BoxType. Also in default case, generate a pointer to underlying type instead of a PlaceHolder type.
1 parent b8c1012 commit fe75d2c

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

flang/lib/Optimizer/Transforms/DebugTypeGenerator.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -685,11 +685,6 @@ DebugTypeGenerator::convertType(mlir::Type Ty, mlir::LLVM::DIFileAttr fileAttr,
685685
llvmTypeConverter.getIndexTypeBitwidth(),
686686
llvm::dwarf::DW_ATE_signed);
687687
} else if (auto boxTy = mlir::dyn_cast_or_null<fir::BaseBoxType>(Ty)) {
688-
if (mlir::isa<fir::ClassType>(Ty))
689-
return convertPointerLikeType(boxTy.unwrapInnerType(), fileAttr, scope,
690-
declOp, /*genAllocated=*/false,
691-
/*genAssociated=*/true);
692-
693688
auto elTy = boxTy.getEleTy();
694689
if (auto seqTy = mlir::dyn_cast_or_null<fir::SequenceType>(elTy))
695690
return convertBoxedSequenceType(seqTy, fileAttr, scope, declOp, false,
@@ -702,7 +697,9 @@ DebugTypeGenerator::convertType(mlir::Type Ty, mlir::LLVM::DIFileAttr fileAttr,
702697
return convertPointerLikeType(ptrTy.getElementType(), fileAttr, scope,
703698
declOp, /*genAllocated=*/false,
704699
/*genAssociated=*/true);
705-
return genPlaceholderType(context);
700+
return convertPointerLikeType(elTy, fileAttr, scope, declOp,
701+
/*genAllocated=*/false,
702+
/*genAssociated=*/false);
706703
} else {
707704
// FIXME: These types are currently unhandled. We are generating a
708705
// placeholder type to allow us to test supported bits.

0 commit comments

Comments
 (0)