swift
61c12e4b - Fix LoadableByAddress to use @in_guaranteed for unowned values

Commit
2 years ago
Fix LoadableByAddress to use @in_guaranteed for unowned values LoadableByAddress was accidentally changing ownership of direct_unowned values to @in (owned). This generates unsupported SIL for on-stack partial applies, which now breaks SIL verification. This also resulted in extra copies of values inside of closure contexts. Before calling the original function, the value would need to be copied onto the stack and the context would be destroyed. Now, we simply pass a pointer directly from the closure context. See IRGen/indirect_argument.sil+huge_partial_application. I'm pretty sure fixing this has no effect on the mangling of public symbols.
Author
Committer
Parents
Loading