[flang] Accept polymorphic component element in storage_size
When an element is extracted from a polymorphic array, it is represented as a PolymorphicValue. The PolymorphicValue is not a boxed value but holds the original polyrmophic array and the element itself. This was raising an error in storage_size lowering since we expect a boxed value to take advantage of fir.box_elesize. This patch handles PolymorphicValue correctly. Reviewed By: PeteSteinfeld Differential Revision: https://reviews.llvm.org/D144643
Loading
Please sign in to comment