[flang][NFC] Centralize fir.class addition in ConvertType
authorValentin Clement <clementval@gmail.com>
Wed, 8 Feb 2023 09:28:31 +0000 (10:28 +0100)
committerValentin Clement <clementval@gmail.com>
Wed, 8 Feb 2023 09:28:58 +0000 (10:28 +0100)
commit1e413b905545e738393a8c45acb79017d49927c4
treed4be2b2c5ddef11bb065949b562730edc8c1a1ed
parent50ea17b849a601bad634d98186155e7526cd4b5c
[flang][NFC] Centralize fir.class addition in ConvertType

fir.class type is always needed for polymorphic and unlimited
polymorphic entities. Wrapping the element type with a fir.class
type was done in ConvertType for some case and else where in the
code for other. Centralize this in ConvertType when converting
from expr or symbol.

Reviewed By: jeanPerier

Differential Revision: https://reviews.llvm.org/D143490
flang/lib/Lower/ConvertType.cpp
flang/lib/Lower/HostAssociations.cpp