@@ -768,13 +768,13 @@ class SILBuilder {
768
768
769
769
SILValue emitBeginBorrowOperation (SILLocation loc, SILValue v) {
770
770
if (!hasOwnership () ||
771
- v. getOwnershipKind ().isCompatibleWith (OwnershipKind::Guaranteed))
771
+ v-> getOwnershipKind ().isCompatibleWith (OwnershipKind::Guaranteed))
772
772
return v;
773
773
return createBeginBorrow (loc, v);
774
774
}
775
775
776
776
void emitEndBorrowOperation (SILLocation loc, SILValue v) {
777
- if (!hasOwnership () || v. getOwnershipKind () == OwnershipKind::None)
777
+ if (!hasOwnership () || v-> getOwnershipKind () == OwnershipKind::None)
778
778
return ;
779
779
createEndBorrow (loc, v);
780
780
}
@@ -927,7 +927,7 @@ class SILBuilder {
927
927
MarkUninitializedInst *
928
928
createMarkUninitialized (SILLocation Loc, SILValue src,
929
929
MarkUninitializedInst::Kind k) {
930
- return createMarkUninitialized (Loc, src, k, src. getOwnershipKind ());
930
+ return createMarkUninitialized (Loc, src, k, src-> getOwnershipKind ());
931
931
}
932
932
933
933
MarkUninitializedInst *
@@ -1054,7 +1054,7 @@ class SILBuilder {
1054
1054
SILType Ty,
1055
1055
bool WithoutActuallyEscaping) {
1056
1056
return createConvertFunction (Loc, Op, Ty, WithoutActuallyEscaping,
1057
- Op. getOwnershipKind ());
1057
+ Op-> getOwnershipKind ());
1058
1058
}
1059
1059
1060
1060
ConvertFunctionInst *
@@ -1075,7 +1075,7 @@ class SILBuilder {
1075
1075
}
1076
1076
1077
1077
UpcastInst *createUpcast (SILLocation Loc, SILValue Op, SILType Ty) {
1078
- return createUpcast (Loc, Op, Ty, Op. getOwnershipKind ());
1078
+ return createUpcast (Loc, Op, Ty, Op-> getOwnershipKind ());
1079
1079
}
1080
1080
1081
1081
UpcastInst *createUpcast (SILLocation Loc, SILValue Op, SILType Ty,
@@ -1100,8 +1100,9 @@ class SILBuilder {
1100
1100
1101
1101
UncheckedRefCastInst *createUncheckedRefCast (SILLocation Loc, SILValue Op,
1102
1102
SILType Ty) {
1103
- return insert (UncheckedRefCastInst::create (
1104
- getSILDebugLocation (Loc), Op, Ty, getFunction (), Op.getOwnershipKind ()));
1103
+ return insert (UncheckedRefCastInst::create (getSILDebugLocation (Loc), Op, Ty,
1104
+ getFunction (),
1105
+ Op->getOwnershipKind ()));
1105
1106
}
1106
1107
1107
1108
UncheckedRefCastInst *
@@ -1141,7 +1142,7 @@ class SILBuilder {
1141
1142
1142
1143
UncheckedValueCastInst *createUncheckedValueCast (SILLocation Loc, SILValue Op,
1143
1144
SILType Ty) {
1144
- return createUncheckedValueCast (Loc, Op, Ty, Op. getOwnershipKind ());
1145
+ return createUncheckedValueCast (Loc, Op, Ty, Op-> getOwnershipKind ());
1145
1146
}
1146
1147
1147
1148
UncheckedValueCastInst *
@@ -1155,7 +1156,7 @@ class SILBuilder {
1155
1156
1156
1157
RefToBridgeObjectInst *createRefToBridgeObject (SILLocation Loc, SILValue Ref,
1157
1158
SILValue Bits) {
1158
- return createRefToBridgeObject (Loc, Ref, Bits, Ref. getOwnershipKind ());
1159
+ return createRefToBridgeObject (Loc, Ref, Bits, Ref-> getOwnershipKind ());
1159
1160
}
1160
1161
1161
1162
RefToBridgeObjectInst *
@@ -1168,7 +1169,7 @@ class SILBuilder {
1168
1169
1169
1170
BridgeObjectToRefInst *createBridgeObjectToRef (SILLocation Loc, SILValue Op,
1170
1171
SILType Ty) {
1171
- return createBridgeObjectToRef (Loc, Op, Ty, Op. getOwnershipKind ());
1172
+ return createBridgeObjectToRef (Loc, Op, Ty, Op-> getOwnershipKind ());
1172
1173
}
1173
1174
1174
1175
BridgeObjectToRefInst *
@@ -1211,7 +1212,7 @@ class SILBuilder {
1211
1212
1212
1213
ThinToThickFunctionInst *createThinToThickFunction (SILLocation Loc,
1213
1214
SILValue Op, SILType Ty) {
1214
- return createThinToThickFunction (Loc, Op, Ty, Op. getOwnershipKind ());
1215
+ return createThinToThickFunction (Loc, Op, Ty, Op-> getOwnershipKind ());
1215
1216
}
1216
1217
1217
1218
ThinToThickFunctionInst *
@@ -1327,7 +1328,7 @@ class SILBuilder {
1327
1328
SILType destLoweredTy,
1328
1329
CanType destFormalTy) {
1329
1330
return createUnconditionalCheckedCast (Loc, op, destLoweredTy, destFormalTy,
1330
- op. getOwnershipKind ());
1331
+ op-> getOwnershipKind ());
1331
1332
}
1332
1333
1333
1334
UnconditionalCheckedCastInst *
@@ -1473,7 +1474,7 @@ class SILBuilder {
1473
1474
EnumInst *createEnum (SILLocation Loc, SILValue Operand,
1474
1475
EnumElementDecl *Element, SILType Ty) {
1475
1476
return createEnum (Loc, Operand, Element, Ty,
1476
- Operand ? Operand. getOwnershipKind ()
1477
+ Operand ? Operand-> getOwnershipKind ()
1477
1478
: ValueOwnershipKind (OwnershipKind::None));
1478
1479
}
1479
1480
@@ -1513,7 +1514,7 @@ class SILBuilder {
1513
1514
EnumElementDecl *Element,
1514
1515
SILType Ty) {
1515
1516
return createUncheckedEnumData (Loc, Operand, Element, Ty,
1516
- Operand. getOwnershipKind ());
1517
+ Operand-> getOwnershipKind ());
1517
1518
}
1518
1519
1519
1520
UncheckedEnumDataInst *createUncheckedEnumData (SILLocation Loc,
@@ -1570,7 +1571,7 @@ class SILBuilder {
1570
1571
ProfileCounter DefaultCount = ProfileCounter()) {
1571
1572
return createSelectEnum (Loc, Operand, Ty, DefaultValue, CaseValues,
1572
1573
CaseCounts, DefaultCount,
1573
- Operand. getOwnershipKind ());
1574
+ Operand-> getOwnershipKind ());
1574
1575
}
1575
1576
1576
1577
SelectEnumInst *createSelectEnum (
@@ -1605,14 +1606,14 @@ class SILBuilder {
1605
1606
TupleExtractInst *createTupleExtract (SILLocation Loc, SILValue Operand,
1606
1607
unsigned FieldNo, SILType ResultTy) {
1607
1608
return createTupleExtract (Loc, Operand, FieldNo, ResultTy,
1608
- Operand. getOwnershipKind ());
1609
+ Operand-> getOwnershipKind ());
1609
1610
}
1610
1611
1611
1612
TupleExtractInst *createTupleExtract (SILLocation Loc, SILValue Operand,
1612
1613
unsigned FieldNo) {
1613
1614
auto type = Operand->getType ().getTupleElementType (FieldNo);
1614
1615
return createTupleExtract (Loc, Operand, FieldNo, type,
1615
- Operand. getOwnershipKind ());
1616
+ Operand-> getOwnershipKind ());
1616
1617
}
1617
1618
1618
1619
TupleExtractInst *
@@ -1642,15 +1643,15 @@ class SILBuilder {
1642
1643
StructExtractInst *createStructExtract (SILLocation Loc, SILValue Operand,
1643
1644
VarDecl *Field, SILType ResultTy) {
1644
1645
return createStructExtract (Loc, Operand, Field, ResultTy,
1645
- Operand. getOwnershipKind ());
1646
+ Operand-> getOwnershipKind ());
1646
1647
}
1647
1648
1648
1649
StructExtractInst *createStructExtract (SILLocation Loc, SILValue Operand,
1649
1650
VarDecl *Field) {
1650
1651
auto type = Operand->getType ().getFieldType (Field, getModule (),
1651
1652
getTypeExpansionContext ());
1652
1653
return createStructExtract (Loc, Operand, Field, type,
1653
- Operand. getOwnershipKind ());
1654
+ Operand-> getOwnershipKind ());
1654
1655
}
1655
1656
1656
1657
StructExtractInst *
@@ -1659,7 +1660,7 @@ class SILBuilder {
1659
1660
ValueOwnershipKind forwardingOwnershipKind) {
1660
1661
return insert (new (getModule ()) StructExtractInst (
1661
1662
getSILDebugLocation (Loc), Operand, Field, ResultTy,
1662
- Operand. getOwnershipKind ()));
1663
+ Operand-> getOwnershipKind ()));
1663
1664
}
1664
1665
1665
1666
StructElementAddrInst *createStructElementAddr (SILLocation Loc,
@@ -1701,7 +1702,7 @@ class SILBuilder {
1701
1702
SILValue Operand) {
1702
1703
return insert (
1703
1704
DestructureStructInst::create (getFunction (), getSILDebugLocation (Loc),
1704
- Operand, Operand. getOwnershipKind ()));
1705
+ Operand, Operand-> getOwnershipKind ()));
1705
1706
}
1706
1707
1707
1708
DestructureStructInst *
@@ -1714,7 +1715,7 @@ class SILBuilder {
1714
1715
1715
1716
DestructureTupleInst *createDestructureTuple (SILLocation Loc,
1716
1717
SILValue Operand) {
1717
- return createDestructureTuple (Loc, Operand, Operand. getOwnershipKind ());
1718
+ return createDestructureTuple (Loc, Operand, Operand-> getOwnershipKind ());
1718
1719
}
1719
1720
1720
1721
DestructureTupleInst *
@@ -1793,7 +1794,7 @@ class SILBuilder {
1793
1794
SILValue Operand,
1794
1795
SILType SelfTy) {
1795
1796
return createOpenExistentialValue (Loc, Operand, SelfTy,
1796
- Operand. getOwnershipKind ());
1797
+ Operand-> getOwnershipKind ());
1797
1798
}
1798
1799
1799
1800
OpenExistentialValueInst *
@@ -1813,7 +1814,7 @@ class SILBuilder {
1813
1814
OpenExistentialRefInst *
1814
1815
createOpenExistentialRef (SILLocation Loc, SILValue Operand, SILType Ty) {
1815
1816
return createOpenExistentialRef (Loc, Operand, Ty,
1816
- Operand. getOwnershipKind ());
1817
+ Operand-> getOwnershipKind ());
1817
1818
}
1818
1819
1819
1820
OpenExistentialRefInst *
@@ -1832,7 +1833,7 @@ class SILBuilder {
1832
1833
OpenExistentialBoxValueInst *
1833
1834
createOpenExistentialBoxValue (SILLocation Loc, SILValue Operand, SILType Ty) {
1834
1835
return createOpenExistentialBoxValue (Loc, Operand, Ty,
1835
- Operand. getOwnershipKind ());
1836
+ Operand-> getOwnershipKind ());
1836
1837
}
1837
1838
1838
1839
OpenExistentialBoxValueInst *
@@ -1876,7 +1877,7 @@ class SILBuilder {
1876
1877
ArrayRef<ProtocolConformanceRef> Conformances) {
1877
1878
return createInitExistentialRef (Loc, ExistentialType, FormalConcreteType,
1878
1879
Concrete, Conformances,
1879
- Concrete. getOwnershipKind ());
1880
+ Concrete-> getOwnershipKind ());
1880
1881
}
1881
1882
1882
1883
InitExistentialRefInst *
@@ -2001,7 +2002,7 @@ class SILBuilder {
2001
2002
2002
2003
MarkDependenceInst *createMarkDependence (SILLocation Loc, SILValue value,
2003
2004
SILValue base) {
2004
- return createMarkDependence (Loc, value, base, value. getOwnershipKind ());
2005
+ return createMarkDependence (Loc, value, base, value-> getOwnershipKind ());
2005
2006
}
2006
2007
2007
2008
MarkDependenceInst *
@@ -2489,7 +2490,7 @@ class SILBuilder {
2489
2490
// / lowering for the non-address value.
2490
2491
void emitDestroyValueOperation (SILLocation Loc, SILValue v) {
2491
2492
assert (!v->getType ().isAddress ());
2492
- if (F->hasOwnership () && v. getOwnershipKind () == OwnershipKind::None)
2493
+ if (F->hasOwnership () && v-> getOwnershipKind () == OwnershipKind::None)
2493
2494
return ;
2494
2495
auto &lowering = getTypeLowering (v->getType ());
2495
2496
lowering.emitDestroyValue (*this , Loc, v);
@@ -2501,7 +2502,7 @@ class SILBuilder {
2501
2502
SILLocation Loc, SILValue v,
2502
2503
Lowering::TypeLowering::TypeExpansionKind expansionKind) {
2503
2504
assert (!v->getType ().isAddress ());
2504
- if (F->hasOwnership () && v. getOwnershipKind () == OwnershipKind::None)
2505
+ if (F->hasOwnership () && v-> getOwnershipKind () == OwnershipKind::None)
2505
2506
return ;
2506
2507
auto &lowering = getTypeLowering (v->getType ());
2507
2508
lowering.emitLoweredDestroyValue (*this , Loc, v, expansionKind);
@@ -2523,7 +2524,7 @@ class SILBuilder {
2523
2524
assert (!v->getType ().isAddress ());
2524
2525
if (v->getType ().isTrivial (*getInsertionBB ()->getParent ()))
2525
2526
return v;
2526
- assert (v. getOwnershipKind () == OwnershipKind::Owned &&
2527
+ assert (v-> getOwnershipKind () == OwnershipKind::Owned &&
2527
2528
" move_value consumes its argument" );
2528
2529
return createMoveValue (Loc, v);
2529
2530
}
@@ -2626,7 +2627,7 @@ class SILBuilder {
2626
2627
SILLocation Loc, NormalDifferentiableFunctionTypeComponent Extractee,
2627
2628
SILValue Function, Optional<SILType> ExtracteeType = None) {
2628
2629
return createDifferentiableFunctionExtract (
2629
- Loc, Extractee, Function, Function. getOwnershipKind (), ExtracteeType);
2630
+ Loc, Extractee, Function, Function-> getOwnershipKind (), ExtracteeType);
2630
2631
}
2631
2632
2632
2633
DifferentiableFunctionExtractInst *createDifferentiableFunctionExtract (
@@ -2649,7 +2650,7 @@ class SILBuilder {
2649
2650
SILLocation Loc, LinearDifferentiableFunctionTypeComponent Extractee,
2650
2651
SILValue Function) {
2651
2652
return createLinearFunctionExtract (Loc, Extractee, Function,
2652
- Function. getOwnershipKind ());
2653
+ Function-> getOwnershipKind ());
2653
2654
}
2654
2655
2655
2656
LinearFunctionExtractInst *createLinearFunctionExtract (
0 commit comments