Skip to content

Commit a336904

Browse files
authored
Merge pull request #29599 from gottesmm/pr-762e321418ba69083a3400aa47cb65b0d34f5e37
2 parents 13072cf + 8f91b9e commit a336904

File tree

4 files changed

+4
-12
lines changed

4 files changed

+4
-12
lines changed

Diff for: include/swift/SIL/SILBuilder.h

-6
Original file line numberDiff line numberDiff line change
@@ -806,12 +806,6 @@ class SILBuilder {
806806
EndBorrowInst(getSILDebugLocation(loc), borrowedValue));
807807
}
808808

809-
EndBorrowInst *createEndBorrow(SILLocation Loc, SILValue BorrowedValue,
810-
SILValue OriginalValue) {
811-
return insert(new (getModule())
812-
EndBorrowInst(getSILDebugLocation(Loc), BorrowedValue));
813-
}
814-
815809
BeginAccessInst *createBeginAccess(SILLocation loc, SILValue address,
816810
SILAccessKind accessKind,
817811
SILAccessEnforcement enforcement,

Diff for: include/swift/SIL/SILCloner.h

+2-3
Original file line numberDiff line numberDiff line change
@@ -1177,9 +1177,8 @@ void SILCloner<ImplClass>::visitEndBorrowInst(EndBorrowInst *Inst) {
11771177
return;
11781178

11791179
recordClonedInstruction(
1180-
Inst,
1181-
getBuilder().createEndBorrow(getOpLocation(Inst->getLoc()),
1182-
getOpValue(Inst->getOperand()), SILValue()));
1180+
Inst, getBuilder().createEndBorrow(getOpLocation(Inst->getLoc()),
1181+
getOpValue(Inst->getOperand())));
11831182
}
11841183

11851184
template <typename ImplClass>

Diff for: lib/SILGen/FormalEvaluation.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ void FormalAccess::verify(SILGenFunction &SGF) const {
4848
//===----------------------------------------------------------------------===//
4949

5050
void SharedBorrowFormalAccess::finishImpl(SILGenFunction &SGF) {
51-
SGF.B.createEndBorrow(CleanupLocation::get(loc), borrowedValue,
52-
originalValue);
51+
SGF.B.createEndBorrow(CleanupLocation::get(loc), borrowedValue);
5352
}
5453

5554
//===----------------------------------------------------------------------===//

Diff for: lib/SILGen/SILGenLValue.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3711,7 +3711,7 @@ static SILValue emitLoadOfSemanticRValue(SILGenFunction &SGF,
37113711
if (!isTake) { \
37123712
SILValue value = SGF.B.createLoadBorrow(loc, src); \
37133713
SILValue strongValue = SGF.B.createStrongCopy##Name##Value(loc, value); \
3714-
SGF.B.createEndBorrow(loc, value, src); \
3714+
SGF.B.createEndBorrow(loc, value); \
37153715
return strongValue; \
37163716
} \
37173717
/* Otherwise perform a load take and destroy the stored value. */ \

0 commit comments

Comments
 (0)