Commit Graph

1 Commits

Author SHA1 Message Date
Michael Gottesman
be87297179 [silgenpattern] Perform a copy if we have a borrowed cast operand, before we store it.
Sometimes in SILGenPattern, we need use an indirect cast on object that does
not require re-abstraction as an optimization. A notable case where this happens
are various casts related to NSError. In such a case, if we have a borrowed cast
operand, perform a copy before the store to preserve semantic sil invariants.

rdar://31880847
2017-07-08 21:56:20 -07:00