mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Scope-ending instructions, like `end_borrow` are only irrelevant for RLE if the preceding load is not changed. If it is changed from `load [copy]` -> `load [take]` the memory effects of those scope-ending instructions prevent that the `load [take]` will illegally mutate memory which is protected from mutation by the scope. Fixes a memory verifier crash rdar://139824805