mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
`end_borrow` instructions may end the scopes introduced by `load_borrow` or `store_borrow` instructions, or those introduced by `begin_borrow` whose operand's guaranteed root includes a `load_borrow`. Previously, such scope ending instructions which end the scope associated with a borrowing load or store were not regarded as accessing the loaded-from or stored-to address. One consequence of this is that they were not regarded as accessing pointers and thus not as deinit barriers; that in turn resulted in `destroy_addr`s being hoisted into such borrow scopes. Here this is fixed by regarding such `end_borrow`s to access the loaded-from or stored-to address of the scope-introducing `load_borrow` or `store_borrow` respectively. rdar://157772187