Skip to content

Commit db2daf3

Browse files
committed
[NFC] SIL: Renamed helper.
removing...To -> removing...From
1 parent 8e8e486 commit db2daf3

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

include/swift/SIL/SILInstruction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9110,7 +9110,7 @@ class MoveOnlyWrapperToCopyableBoxInst
91109110
ValueOwnershipKind forwardingOwnershipKind)
91119111
: UnaryInstructionBase(
91129112
DebugLoc, operand,
9113-
operand->getType().removingMoveOnlyWrapperToBoxedType(
9113+
operand->getType().removingMoveOnlyWrapperFromBoxedType(
91149114
operand->getFunction()),
91159115
forwardingOwnershipKind) {
91169116
assert(

include/swift/SIL/SILType.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ class SILType {
855855
///
856856
/// DISCUSSION: This is separate from removingMoveOnlyWrapper since this API
857857
/// requires a SILFunction * and is specialized.
858-
SILType removingMoveOnlyWrapperToBoxedType(const SILFunction *fn);
858+
SILType removingMoveOnlyWrapperFromBoxedType(const SILFunction *fn);
859859

860860
/// Returns a SILType with any archetypes mapped out of context.
861861
SILType mapTypeOutOfContext() const;

include/swift/SIL/SILValue.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ class ValueBase : public SILNode, public SILAllocated<ValueBase> {
603603
Type = Type.removingMoveOnlyWrapper();
604604
} else {
605605
assert(Type.isBoxedMoveOnlyWrappedType(fn));
606-
Type = Type.removingMoveOnlyWrapperToBoxedType(fn);
606+
Type = Type.removingMoveOnlyWrapperFromBoxedType(fn);
607607
}
608608
return true;
609609
}

lib/SIL/IR/SILType.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1266,7 +1266,7 @@ SILType SILType::addingMoveOnlyWrapperToBoxedType(const SILFunction *fn) {
12661266
return SILType::getPrimitiveObjectType(newBoxType);
12671267
}
12681268

1269-
SILType SILType::removingMoveOnlyWrapperToBoxedType(const SILFunction *fn) {
1269+
SILType SILType::removingMoveOnlyWrapperFromBoxedType(const SILFunction *fn) {
12701270
auto boxTy = castTo<SILBoxType>();
12711271
auto *oldLayout = boxTy->getLayout();
12721272
auto oldField = oldLayout->getFields()[0];

lib/SIL/Verifier/SILVerifier.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6463,9 +6463,11 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
64636463
"Operand value should be an object");
64646464
require(cvt->getOperand()->getType().isBoxedMoveOnlyWrappedType(cvt->getFunction()),
64656465
"Operand should be move only wrapped");
6466-
require(cvt->getType() ==
6467-
cvt->getOperand()->getType().removingMoveOnlyWrapperToBoxedType(cvt->getFunction()),
6468-
"Result and operand must have the same type, today.");
6466+
require(
6467+
cvt->getType() ==
6468+
cvt->getOperand()->getType().removingMoveOnlyWrapperFromBoxedType(
6469+
cvt->getFunction()),
6470+
"Result and operand must have the same type, today.");
64696471
}
64706472

64716473
void checkCopyableToMoveOnlyWrapperValueInst(

0 commit comments

Comments
 (0)