Commits

Slava Pestov committed e5cb73fe414
SILGen: Clean up ErasureExpr lowering, NFC This is a step towards partially-applying methods that return Self on existentials. - We model opening of both existential values and metatypes with OpenExistentialExpr, but erasure had two forms, ErasureExpr and MetatypeErasureExpr. Combine them into one, since both Sema and SILGen have similar code paths for each. - If the source type of an ErasureExpr is a closed existential, have Sema emit an OpenExistentialExpr, and remove SILGen's openExistentialForErasure() path, which mostly duplicates openExistentialImpl(). - There was one difference between openExistentialForErasure() and openExistentialImpl(). The former would emit the opaque value in +0 context, and the latter in a +1 with initialization. The previous patch ensures that visitOpaqueValueExpr() generates equivalent code in both cases. Swift SVN r31261