The actual polymorphic expression argument that is passed to a non-polymorphic contiguous dummy has to be made a contiguous entity with the dynamic type matching the declared type of the dummy argument. The solution is to associate the expression with a temporary of the dynamic type of the expression, then rebox the temporary to the declared type of the dummy argument, and then, if necessary, make copy-in into another temporary that is, finally, a contiguous entity with the required dynamic type. With this change a single prepared argument may have up to two associated clean-ups, so I had to change the clean-ups handling. Reviewed By: tblah Differential Revision: https://reviews.llvm.org/D157464
97 KiB
97 KiB