Skip to content

Commit 7bb2064

Browse files
authored
Merge pull request #9263 from jckarter/keypath-inst-effects
SIL: KeyPathInst has to have side effects, since it retains.
2 parents 8471cb7 + 76b9f21 commit 7bb2064

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

include/swift/SIL/SILNodes.def

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,9 @@ ABSTRACT_VALUE(SILInstruction, ValueBase)
251251
INST(InitBlockStorageHeaderInst, SILInstruction, init_block_storage_header, None, DoesNotRelease)
252252

253253
// Key paths
254-
INST(KeyPathInst, SILInstruction, keypath, None, DoesNotRelease)
254+
// TODO: The only "side effect" is potentially retaining the returned key path
255+
// object; is there a more specific effect?
256+
INST(KeyPathInst, SILInstruction, keypath, MayHaveSideEffects, DoesNotRelease)
255257

256258
// Conversions
257259
ABSTRACT_VALUE(ConversionInst, SILInstruction)

0 commit comments

Comments
 (0)