Skip to content

Commit f201cee

Browse files
committed
[NFC] MoveOnly: Add parameter to function.
For now, it is unused.
1 parent b794e21 commit f201cee

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

lib/SILOptimizer/Mandatory/MoveOnlyAddressCheckerUtils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1899,7 +1899,7 @@ shouldEmitPartialMutationError(UseState &useState, PartialMutation::Kind kind,
18991899
// Otherwise, walk one level towards our child type. We unconditionally
19001900
// unwrap since we should never fail here due to earlier checking.
19011901
std::tie(iterPair, iterType) =
1902-
*pair.walkOneLevelTowardsChild(iterPair, iterType, fn);
1902+
*pair.walkOneLevelTowardsChild(iterPair, iterType, targetType, fn);
19031903
}
19041904

19051905
return {};

lib/SILOptimizer/Mandatory/MoveOnlyBorrowToDestructureUtils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1390,8 +1390,8 @@ void Implementation::rewriteUses(InstructionDeleter *deleter) {
13901390

13911391
// Then walk one level towards our target type.
13921392
std::tie(iterOffsetSize, iterType) =
1393-
*useOffsetSize.walkOneLevelTowardsChild(parentOffsetSize,
1394-
iterType, fn);
1393+
*useOffsetSize.walkOneLevelTowardsChild(
1394+
parentOffsetSize, iterType, unwrappedOperandType, fn);
13951395

13961396
unsigned start = parentOffsetSize.startOffset;
13971397
consumeBuilder.emitDestructureValueOperation(

lib/SILOptimizer/Mandatory/MoveOnlyTypeUtils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ static StructDecl *getFullyReferenceableStruct(SILType ktypeTy) {
2626
std::optional<std::pair<TypeOffsetSizePair, SILType>>
2727
TypeOffsetSizePair::walkOneLevelTowardsChild(
2828
TypeOffsetSizePair ancestorOffsetSize, SILType ancestorType,
29-
SILFunction *fn) const {
29+
SILType childType, SILFunction *fn) const {
3030
assert(ancestorOffsetSize.size >= size &&
3131
"Too large to be a child of ancestorType");
3232
assert((ancestorOffsetSize.startOffset <= startOffset &&

lib/SILOptimizer/Mandatory/MoveOnlyTypeUtils.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ struct TypeOffsetSizePair {
6464
/// be a child type of \p ancestorType.
6565
std::optional<std::pair<TypeOffsetSizePair, SILType>>
6666
walkOneLevelTowardsChild(TypeOffsetSizePair ancestorOffsetSize,
67-
SILType ancestorType, SILFunction *fn) const;
67+
SILType ancestorType, SILType childType,
68+
SILFunction *fn) const;
6869

6970
/// Given an ancestor offset \p ancestorOffset and a type called \p
7071
/// ancestorType, walk one level towards this current type inserting on value,

0 commit comments

Comments
 (0)