Skip to content

Commit 510e911

Browse files
committed
[Gardening] Listed switch_enum explicitly.
Make it clear that it's not a missed case. It changes representation.
1 parent ca43d71 commit 510e911

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/SIL/IR/SILInstructions.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2884,6 +2884,9 @@ ReturnInst::ReturnInst(SILFunction &func, SILDebugLocation debugLoc,
28842884

28852885
bool OwnershipForwardingMixin::hasSameRepresentation(SILInstruction *inst) {
28862886
switch (inst->getKind()) {
2887+
// Explicitly list instructions which definitely involve a representation
2888+
// change.
2889+
case SILInstructionKind::SwitchEnumInst:
28872890
default:
28882891
// Conservatively assume that a conversion changes representation.
28892892
// Operations can be added as needed to participate in SIL opaque values.

0 commit comments

Comments
 (0)