Skip to content

Commit

Permalink
Fix fir::unwrapSeqOrBoxedSeqType (llvm#72171)
Browse files Browse the repository at this point in the history
Fixing fir::unwrapSeqOrBoxedSeqType check for fir::BaseBoxType to add
support for fir::BoxType and fir::ClassType
  • Loading branch information
Renaud-K authored Nov 14, 2023
1 parent 5079b27 commit 725115d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flang/lib/Optimizer/Dialect/FIRType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ mlir::Type unwrapAllRefAndSeqType(mlir::Type ty) {
mlir::Type unwrapSeqOrBoxedSeqType(mlir::Type ty) {
if (auto seqTy = ty.dyn_cast<fir::SequenceType>())
return seqTy.getEleTy();
if (auto boxTy = ty.dyn_cast<fir::BoxType>()) {
if (auto boxTy = ty.dyn_cast<fir::BaseBoxType>()) {
auto eleTy = unwrapRefType(boxTy.getEleTy());
if (auto seqTy = eleTy.dyn_cast<fir::SequenceType>())
return seqTy.getEleTy();
Expand Down

0 comments on commit 725115d

Please sign in to comment.