swift
2940e7d5 - [apply-site] Refactor out a helper function called insertAfterApply -> ApplySite.insertAfter().

Commit
6 years ago
[apply-site] Refactor out a helper function called insertAfterApply -> ApplySite.insertAfter(). Often times when one is working with apply sites, one wants to insert instructions after both terminator apply sites and normal apply sites. This can get ackward and result in unnecessary if-else code that is all really doing the same thing, once for terminator instructions and once for normal instructions. insertAfterApply is a helper method that MandatoryInlining uses for this purpose and it is so useful that I want to use it somewhere else in closure lifetime fixup as well. I am moving it onto apply site since that is the true abstraction that insertAfterApply works with.
Author
Committer
Parents
Loading