[ownership] Get rid of old entrypoint for creatingEndBorrow that takes the original value.

The original design was to make it so that end_borrow tied at the use level its
original/borrowed value. So we would have:

```
%borrowedVal = begin_borrow %original
...
end_borrow %borrowedVal from %original
```

In the end we decided not to use that design and instead just use:

```
%borrowedVal = begin_borrow %original
...
end_borrow %borrowedVal
```

In order to enable that transition, I left the old API for end_borrow that took
both original and borrowedVal and reimplemented it on top of the new API that
just took the borrowedVal (i.e. the original was just a dead arg).

Now given where we are in the development, it makes sense to get rid of that
transition API and move to just use the new API.
This commit is contained in:
Michael Gottesman
2020-02-02 12:44:52 -08:00
parent a4dbe676a9
commit 8f91b9e89a
4 changed files with 4 additions and 12 deletions

View File

@@ -3711,7 +3711,7 @@ static SILValue emitLoadOfSemanticRValue(SILGenFunction &SGF,
if (!isTake) { \
SILValue value = SGF.B.createLoadBorrow(loc, src); \
SILValue strongValue = SGF.B.createStrongCopy##Name##Value(loc, value); \
SGF.B.createEndBorrow(loc, value, src); \
SGF.B.createEndBorrow(loc, value); \
return strongValue; \
} \
/* Otherwise perform a load take and destroy the stored value. */ \