Skip to content

Commit dfe62b4

Browse files
committed
Allow AddressUseDefWalker to continue past MarkUninitializedInst.
This makes SwiftCompilerSources address/access utilities consistent with C++ and allows them to be used in diagnostic passes.
1 parent df6f1d6 commit dfe62b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

SwiftCompilerSources/Sources/SIL/Utilities/WalkUtils.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -777,8 +777,8 @@ extension AddressUseDefWalker {
777777
} else {
778778
return walkUp(address: ia.base, path: path.push(.anyIndexedElement, index: 0))
779779
}
780-
case let mdi as MarkDependenceInst:
781-
return walkUp(address: mdi.operands[0].value, path: path)
780+
case is MarkDependenceInst, is MarkUninitializedInst:
781+
return walkUp(address: (def as! Instruction).operands[0].value, path: path)
782782
case is MoveOnlyWrapperToCopyableAddrInst,
783783
is CopyableToMoveOnlyWrapperAddrInst:
784784
return walkUp(address: (def as! Instruction).operands[0].value, path: path)

0 commit comments

Comments
 (0)