Skip to content

Commit 43f42e2

Browse files
committed
[borrowing/consuming] Add new instruction: moveonlywrapper_to_copyable_addr.
The reason why I am using a different instruction for addresses and objects here is that the object checker doesnt have to deal with things like initialization.
1 parent 76374f8 commit 43f42e2

23 files changed

+274
-7
lines changed

include/swift/AST/DiagnosticsParse.def

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,11 @@ ERROR(sil_ref_inst_wrong_field,none,
603603
ERROR(sil_invalid_instr_operands,none,
604604
"invalid instruction operands", ())
605605
ERROR(sil_operand_not_address,none,
606-
"%0 operand of '%1' must have address type", (StringRef, StringRef))
606+
"%0 of '%1' must have address type", (StringRef, StringRef))
607+
ERROR(sil_operand_not_object,none,
608+
"%0 of '%1' must have object type", (StringRef, StringRef))
609+
ERROR(sil_operand_has_incorrect_moveonlywrapped,none,
610+
"%0 of '%1' %select{must|must not}2 be of moveonlywrapped type", (StringRef, StringRef, unsigned))
607611
ERROR(sil_operand_not_ref_storage_address,none,
608612
"%0 operand of '%1' must have address of %2 type",
609613
(StringRef, StringRef, ReferenceOwnership))

include/swift/SIL/SILBuilder.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1413,6 +1413,12 @@ class SILBuilder {
14131413
CopyableToMoveOnlyWrapperValueInst::Guaranteed));
14141414
}
14151415

1416+
MoveOnlyWrapperToCopyableAddrInst *
1417+
createMoveOnlyWrapperToCopyableAddr(SILLocation loc, SILValue src) {
1418+
return insert(new (getModule()) MoveOnlyWrapperToCopyableAddrInst(
1419+
getSILDebugLocation(loc), src));
1420+
}
1421+
14161422
MoveOnlyWrapperToCopyableValueInst *
14171423
createOwnedMoveOnlyWrapperToCopyableValue(SILLocation loc, SILValue src) {
14181424
return insert(new (getModule()) MoveOnlyWrapperToCopyableValueInst(

include/swift/SIL/SILCloner.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1941,6 +1941,15 @@ void SILCloner<ImplClass>::visitMoveOnlyWrapperToCopyableValueInst(
19411941
recordClonedInstruction(inst, cvt);
19421942
}
19431943

1944+
template <typename ImplClass>
1945+
void SILCloner<ImplClass>::visitMoveOnlyWrapperToCopyableAddrInst(
1946+
MoveOnlyWrapperToCopyableAddrInst *inst) {
1947+
getBuilder().setCurrentDebugScope(getOpScope(inst->getDebugScope()));
1948+
recordClonedInstruction(
1949+
inst, getBuilder().createMoveOnlyWrapperToCopyableAddr(
1950+
getOpLocation(inst->getLoc()), getOpValue(inst->getOperand())));
1951+
}
1952+
19441953
template <typename ImplClass>
19451954
void SILCloner<ImplClass>::visitCopyableToMoveOnlyWrapperValueInst(
19461955
CopyableToMoveOnlyWrapperValueInst *inst) {

include/swift/SIL/SILInstruction.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8574,6 +8574,19 @@ class MoveOnlyWrapperToCopyableValueInst
85748574
InitialKind getInitialKind() const { return initialKind; }
85758575
};
85768576

8577+
class MoveOnlyWrapperToCopyableAddrInst
8578+
: public UnaryInstructionBase<
8579+
SILInstructionKind::MoveOnlyWrapperToCopyableAddrInst,
8580+
SingleValueInstruction> {
8581+
friend class SILBuilder;
8582+
8583+
MoveOnlyWrapperToCopyableAddrInst(const SILFunction &fn,
8584+
SILDebugLocation DebugLoc, SILValue operand)
8585+
: UnaryInstructionBase(DebugLoc, operand,
8586+
operand->getType().removingMoveOnlyWrapper()) {
8587+
}
8588+
};
8589+
85778590
/// Given an object reference, return true iff it is non-nil and refers
85788591
/// to a native swift object with strong reference count of 1.
85798592
class IsUniqueInst

include/swift/SIL/SILNodes.def

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,11 +490,16 @@ ABSTRACT_VALUE_AND_INST(SingleValueInstruction, ValueBase, SILInstruction)
490490
// and owned for assignment/owned function arguments.
491491
SINGLE_VALUE_INST(CopyableToMoveOnlyWrapperValueInst, copyable_to_moveonlywrapper,
492492
SingleValueInstruction, None, DoesNotRelease)
493-
// Convert a $@moveOnly T to $T. Ownership is fixed at construction by
493+
// Convert a $@moveOnly T object to $T. Ownership is fixed at construction by
494494
// frontend to express specific semantics: guaranteed for function arguments
495495
// and owned for assignment/return values.
496-
SINGLE_VALUE_INST(MoveOnlyWrapperToCopyableValueInst, moveonlywrapper_to_copyable,
497-
SingleValueInstruction, None, DoesNotRelease)
496+
SINGLE_VALUE_INST(MoveOnlyWrapperToCopyableValueInst,
497+
moveonlywrapper_to_copyable, SingleValueInstruction, None,
498+
DoesNotRelease)
499+
// Convert a $*@moveOnly T to $*T. Acts just as a cast.
500+
SINGLE_VALUE_INST(MoveOnlyWrapperToCopyableAddrInst,
501+
moveonlywrapper_to_copyable_addr, SingleValueInstruction,
502+
None, DoesNotRelease)
498503
// A move_addr is a Raw SIL only instruction that is equivalent to a copy_addr
499504
// [init]. It is lowered during the diagnostic passes to a copy_addr [init] if
500505
// the move checker found uses that prevented us from converting this to a

lib/IRGen/IRGenSIL.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1269,6 +1269,11 @@ class IRGenSILFunction :
12691269
auto e = getLoweredExplosion(i->getOperand());
12701270
setLoweredExplosion(i, e);
12711271
}
1272+
void
1273+
visitMoveOnlyWrapperToCopyableAddrInst(MoveOnlyWrapperToCopyableAddrInst *i) {
1274+
auto e = getLoweredExplosion(i->getOperand());
1275+
setLoweredExplosion(i, e);
1276+
}
12721277
void visitReleaseValueInst(ReleaseValueInst *i);
12731278
void visitReleaseValueAddrInst(ReleaseValueAddrInst *i);
12741279
void visitDestroyValueInst(DestroyValueInst *i);

lib/SIL/IR/OperandOwnership.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ OPERAND_OWNERSHIP(TrivialUse, AddressToPointer)
148148
OPERAND_OWNERSHIP(TrivialUse, AllocRef) // with tail operand
149149
OPERAND_OWNERSHIP(TrivialUse, AllocRefDynamic) // with tail operand
150150
OPERAND_OWNERSHIP(TrivialUse, BeginAccess)
151+
OPERAND_OWNERSHIP(TrivialUse, MoveOnlyWrapperToCopyableAddr)
151152
OPERAND_OWNERSHIP(TrivialUse, BeginUnpairedAccess)
152153
OPERAND_OWNERSHIP(TrivialUse, BindMemory)
153154
OPERAND_OWNERSHIP(TrivialUse, RebindMemory)

lib/SIL/IR/SILPrinter.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2490,6 +2490,10 @@ class SILPrinter : public SILInstructionVisitor<SILPrinter> {
24902490
<< (BAI->isFromBuiltin() ? "[builtin] " : "")
24912491
<< getIDAndType(BAI->getOperand());
24922492
}
2493+
void visitMoveOnlyWrapperToCopyableAddrInst(
2494+
MoveOnlyWrapperToCopyableAddrInst *BAI) {
2495+
*this << getIDAndType(BAI->getOperand());
2496+
}
24932497
void visitEndAccessInst(EndAccessInst *EAI) {
24942498
*this << (EAI->isAborting() ? "[abort] " : "")
24952499
<< getIDAndType(EAI->getOperand());

lib/SIL/IR/ValueOwnership.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ CONSTANT_OWNERSHIP_INST(None, AllocPack)
9797
CONSTANT_OWNERSHIP_INST(None, AllocPackMetadata)
9898
CONSTANT_OWNERSHIP_INST(None, PackLength)
9999
CONSTANT_OWNERSHIP_INST(None, BeginAccess)
100+
CONSTANT_OWNERSHIP_INST(None, MoveOnlyWrapperToCopyableAddr)
100101
CONSTANT_OWNERSHIP_INST(None, BindMemory)
101102
CONSTANT_OWNERSHIP_INST(None, RebindMemory)
102103
CONSTANT_OWNERSHIP_INST(None, BridgeObjectToWord)

lib/SIL/Parser/ParseSIL.cpp

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3847,6 +3847,20 @@ bool SILParser::parseSpecificSILInstruction(SILBuilder &B,
38473847
return true;
38483848
if (parseSILDebugLocation(InstLoc, B))
38493849
return true;
3850+
3851+
if (!Val->getType().isObject()) {
3852+
P.diagnose(InstLoc.getSourceLoc(),
3853+
diag::sil_operand_not_object, "operand", OpcodeName);
3854+
return true;
3855+
}
3856+
3857+
if (Val->getType().isMoveOnlyWrapped()) {
3858+
P.diagnose(InstLoc.getSourceLoc(),
3859+
diag::sil_operand_has_incorrect_moveonlywrapped,
3860+
"operand", OpcodeName, 1);
3861+
return true;
3862+
}
3863+
38503864
if (OwnershipKind == OwnershipKind::Owned)
38513865
ResultVal = B.createOwnedCopyableToMoveOnlyWrapperValue(InstLoc, Val);
38523866
else
@@ -3879,6 +3893,20 @@ bool SILParser::parseSpecificSILInstruction(SILBuilder &B,
38793893
return true;
38803894
if (parseSILDebugLocation(InstLoc, B))
38813895
return true;
3896+
3897+
if (!Val->getType().isObject()) {
3898+
P.diagnose(InstLoc.getSourceLoc(),
3899+
diag::sil_operand_not_object, "operand", OpcodeName);
3900+
return true;
3901+
}
3902+
3903+
if (!Val->getType().isMoveOnlyWrapped()) {
3904+
P.diagnose(InstLoc.getSourceLoc(),
3905+
diag::sil_operand_has_incorrect_moveonlywrapped,
3906+
"operand", OpcodeName, 0);
3907+
return true;
3908+
}
3909+
38823910
if (OwnershipKind == OwnershipKind::Owned)
38833911
ResultVal = B.createOwnedMoveOnlyWrapperToCopyableValue(InstLoc, Val);
38843912
else
@@ -4575,6 +4603,29 @@ bool SILParser::parseSpecificSILInstruction(SILBuilder &B,
45754603
break;
45764604
}
45774605

4606+
case SILInstructionKind::MoveOnlyWrapperToCopyableAddrInst: {
4607+
SILValue addrVal;
4608+
SourceLoc addrLoc;
4609+
if (parseTypedValueRef(addrVal, addrLoc, B))
4610+
return true;
4611+
4612+
if (parseSILDebugLocation(InstLoc, B))
4613+
return true;
4614+
4615+
if (!addrVal->getType().isAddress()) {
4616+
P.diagnose(addrLoc, diag::sil_operand_not_address, "operand", OpcodeName);
4617+
return true;
4618+
}
4619+
4620+
if (!addrVal->getType().isMoveOnlyWrapped()) {
4621+
P.diagnose(addrLoc, diag::sil_operand_has_incorrect_moveonlywrapped,
4622+
"operand", OpcodeName, 0);
4623+
return true;
4624+
}
4625+
4626+
ResultVal = B.createMoveOnlyWrapperToCopyableAddr(InstLoc, addrVal);
4627+
break;
4628+
}
45784629
case SILInstructionKind::BeginAccessInst:
45794630
case SILInstructionKind::BeginUnpairedAccessInst:
45804631
case SILInstructionKind::EndAccessInst:

lib/SIL/Utils/AddressWalker.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@ AddressUseKind TransitiveAddressWalker::walk(SILValue projectedAddress) && {
159159
isa<UncheckedAddrCastInst>(user) || isa<MarkMustCheckInst>(user) ||
160160
isa<MarkUninitializedInst>(user) || isa<DropDeinitInst>(user) ||
161161
isa<ProjectBlockStorageInst>(user) || isa<UpcastInst>(user) ||
162-
isa<TuplePackElementAddrInst>(user)) {
162+
isa<TuplePackElementAddrInst>(user) ||
163+
isa<MoveOnlyWrapperToCopyableAddrInst>(user)) {
163164
transitiveResultUses(op);
164165
continue;
165166
}

lib/SIL/Utils/FieldSensitivePrunedLiveness.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ SubElementOffset::computeForAddress(SILValue projectionDerivedFromRoot,
123123
continue;
124124
}
125125

126+
if (auto *m = dyn_cast<MoveOnlyWrapperToCopyableAddrInst>(
127+
projectionDerivedFromRoot)) {
128+
projectionDerivedFromRoot = m->getOperand();
129+
continue;
130+
}
131+
126132
if (auto *teai =
127133
dyn_cast<TupleElementAddrInst>(projectionDerivedFromRoot)) {
128134
SILType tupleType = teai->getOperand()->getType();

lib/SIL/Utils/InstructionUtils.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,7 @@ RuntimeEffect swift::getRuntimeEffect(SILInstruction *inst, SILType &impactType)
435435
case SILInstructionKind::BridgeObjectToWordInst:
436436
case SILInstructionKind::ThinToThickFunctionInst:
437437
case SILInstructionKind::ThickToObjCMetatypeInst:
438+
case SILInstructionKind::MoveOnlyWrapperToCopyableAddrInst:
438439
case SILInstructionKind::ObjCMetatypeToObjectInst:
439440
case SILInstructionKind::ObjCExistentialMetatypeToObjectInst:
440441
case SILInstructionKind::ClassifyBridgeObjectInst:

lib/SIL/Verifier/SILVerifier.cpp

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,12 +669,14 @@ struct ImmutableAddressUseVerifier {
669669
OpenedExistentialAccess::Immutable)
670670
return true;
671671
LLVM_FALLTHROUGH;
672+
case SILInstructionKind::MoveOnlyWrapperToCopyableAddrInst:
672673
case SILInstructionKind::StructElementAddrInst:
673674
case SILInstructionKind::TupleElementAddrInst:
674675
case SILInstructionKind::IndexAddrInst:
675676
case SILInstructionKind::TailAddrInst:
676677
case SILInstructionKind::IndexRawPointerInst:
677678
case SILInstructionKind::MarkMustCheckInst:
679+
case SILInstructionKind::CopyableToMoveOnlyWrapperValueInst:
678680
case SILInstructionKind::PackElementGetInst:
679681
// Add these to our worklist.
680682
for (auto result : inst->getResults()) {
@@ -4500,6 +4502,9 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
45004502
require(UI->getType() != UI->getOperand()->getType(),
45014503
"can't upcast to same type");
45024504
require(UI->getType().isObject(), "cannot upcast address types");
4505+
require(UI->getOperand()->getType().isMoveOnlyWrapped() ==
4506+
UI->getType().isMoveOnlyWrapped(),
4507+
"cast cannot be used to remove move only wrapped?!");
45034508
checkNoTrivialToReferenceCast(UI);
45044509
if (UI->getType().is<MetatypeType>()) {
45054510
CanType instTy(UI->getType().castTo<MetatypeType>()->getInstanceType());
@@ -4593,6 +4598,9 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
45934598
"unchecked_addr_cast operand must be an address");
45944599
require(AI->getType().isAddress(),
45954600
"unchecked_addr_cast result must be an address");
4601+
require(AI->getOperand()->getType().isMoveOnlyWrapped() ==
4602+
AI->getType().isMoveOnlyWrapped(),
4603+
"Unchecked addr cast cannot be used to remove move only wrapped?!");
45964604
}
45974605

45984606
void checkUncheckedTrivialBitCastInst(UncheckedTrivialBitCastInst *BI) {
@@ -4603,6 +4611,9 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
46034611
"unchecked_trivial_bit_cast must produce a value");
46044612
require(BI->getType().isTrivial(F),
46054613
"unchecked_trivial_bit_cast must produce a value of trivial type");
4614+
require(BI->getOperand()->getType().isMoveOnlyWrapped() ==
4615+
BI->getType().isMoveOnlyWrapped(),
4616+
"cast cannot be used to remove move only wrapped?!");
46064617
}
46074618

46084619
void checkUncheckedBitwiseCastInst(UncheckedBitwiseCastInst *BI) {
@@ -4611,6 +4622,9 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
46114622
"unchecked_bitwise_cast must operate on a value");
46124623
require(BI->getType().isObject(),
46134624
"unchecked_bitwise_cast must produce a value");
4625+
require(BI->getOperand()->getType().isMoveOnlyWrapped() ==
4626+
BI->getType().isMoveOnlyWrapped(),
4627+
"cast cannot be used to remove move only wrapped?!");
46144628
}
46154629

46164630
void checkRefToRawPointerInst(RefToRawPointerInst *AI) {
@@ -6005,7 +6019,8 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
60056019
MoveOnlyWrapperToCopyableValueInst *cvt) {
60066020
require(cvt->getOperand()->getType().isObject(),
60076021
"Operand value should be an object");
6008-
require(!cvt->getType().isMoveOnlyWrapped(), "Output should not move only");
6022+
require(cvt->getOperand()->getType().isMoveOnlyWrapped(),
6023+
"Operand should be move only wrapped");
60096024
require(cvt->getType() ==
60106025
cvt->getOperand()->getType().removingMoveOnlyWrapper(),
60116026
"Result and operand must have the same type, today.");
@@ -6039,6 +6054,16 @@ class SILVerifier : public SILVerifierBase<SILVerifier> {
60396054
"Must have alloc_pack_metadata operand");
60406055
}
60416056

6057+
void checkMoveOnlyWrapperToCopyableAddrInst(
6058+
MoveOnlyWrapperToCopyableAddrInst *cvt) {
6059+
require(cvt->getType().isAddress(), "Output should be an address");
6060+
require(cvt->getOperand()->getType().isMoveOnlyWrapped(),
6061+
"Input should be move only");
6062+
require(cvt->getType() ==
6063+
cvt->getOperand()->getType().removingMoveOnlyWrapper(),
6064+
"Result and operand must have the same type.");
6065+
}
6066+
60426067
void verifyEpilogBlocks(SILFunction *F) {
60436068
bool FoundReturnBlock = false;
60446069
bool FoundThrowBlock = false;

lib/SILOptimizer/Mandatory/MoveOnlyWrappedTypeEliminator.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ struct SILMoveOnlyWrappedTypeEliminatorVisitor
129129
return eraseFromParent(inst); \
130130
}
131131
RAUW_ALWAYS(MoveOnlyWrapperToCopyableValue)
132+
RAUW_ALWAYS(MoveOnlyWrapperToCopyableAddr)
132133
RAUW_ALWAYS(CopyableToMoveOnlyWrapperValue)
133134
#undef RAUW_ALWAYS
134135

lib/SILOptimizer/UtilityPasses/SerializeSILPass.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ static bool hasOpaqueArchetype(TypeExpansionContext context,
225225
case SILInstructionKind::BeginBorrowInst:
226226
case SILInstructionKind::StoreBorrowInst:
227227
case SILInstructionKind::BeginAccessInst:
228+
case SILInstructionKind::MoveOnlyWrapperToCopyableAddrInst:
228229
#define NEVER_OR_SOMETIMES_LOADABLE_CHECKED_REF_STORAGE(Name, name, ...) \
229230
case SILInstructionKind::Load##Name##Inst:
230231
#include "swift/AST/ReferenceStorage.def"

lib/SILOptimizer/Utils/SILInliner.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -882,6 +882,7 @@ InlineCost swift::instructionInlineCost(SILInstruction &I) {
882882
case SILInstructionKind::CopyableToMoveOnlyWrapperValueInst:
883883
case SILInstructionKind::MoveOnlyWrapperToCopyableValueInst:
884884
case SILInstructionKind::TestSpecificationInst:
885+
case SILInstructionKind::MoveOnlyWrapperToCopyableAddrInst:
885886
return InlineCost::Free;
886887

887888
// Typed GEPs are free.

lib/Serialization/DeserializeSIL.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2346,6 +2346,13 @@ bool SILDeserializer::readSILInstruction(SILFunction *Fn,
23462346
noNestedConflict, fromBuiltin);
23472347
break;
23482348
}
2349+
case SILInstructionKind::MoveOnlyWrapperToCopyableAddrInst: {
2350+
assert(RecordKind == SIL_ONE_OPERAND);
2351+
SILValue op = getLocalValue(
2352+
ValID, getSILType(MF->getType(TyID), (SILValueCategory)TyCategory, Fn));
2353+
ResultInst = Builder.createMoveOnlyWrapperToCopyableAddr(Loc, op);
2354+
break;
2355+
}
23492356
case SILInstructionKind::EndAccessInst: {
23502357
SILValue op = getLocalValue(
23512358
ValID, getSILType(MF->getType(TyID), (SILValueCategory)TyCategory, Fn));

lib/Serialization/ModuleFormat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const uint16_t SWIFTMODULE_VERSION_MAJOR = 0;
5858
/// describe what change you made. The content of this comment isn't important;
5959
/// it just ensures a conflict if two people change the module format.
6060
/// Don't worry about adhering to the 80-column limit for this line.
61-
const uint16_t SWIFTMODULE_VERSION_MINOR = 786; // de/alloc_pack_metadata
61+
const uint16_t SWIFTMODULE_VERSION_MINOR = 787; // noimplicitcopy addr
6262

6363
/// A standard hash seed used for all string hashes in a serialized module.
6464
///

lib/Serialization/SerializeSIL.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2043,6 +2043,18 @@ void SILSerializer::writeSILInstruction(const SILInstruction &SI) {
20432043
break;
20442044
}
20452045

2046+
case SILInstructionKind::MoveOnlyWrapperToCopyableAddrInst: {
2047+
unsigned abbrCode = SILAbbrCodes[SILOneOperandLayout::Code];
2048+
auto *BAI = cast<MoveOnlyWrapperToCopyableAddrInst>(&SI);
2049+
SILValue operand = BAI->getOperand();
2050+
2051+
SILOneOperandLayout::emitRecord(
2052+
Out, ScratchRecord, abbrCode, (unsigned)SI.getKind(), 0,
2053+
S.addTypeRef(operand->getType().getRawASTType()),
2054+
(unsigned)operand->getType().getCategory(), addValueRef(operand));
2055+
break;
2056+
}
2057+
20462058
case SILInstructionKind::EndAccessInst: {
20472059
unsigned abbrCode = SILAbbrCodes[SILOneOperandLayout::Code];
20482060
auto *EAI = cast<EndAccessInst>(&SI);

0 commit comments

Comments
 (0)