Skip to content

Commit 8431ceb

Browse files
committed
Support MultipleValueInstruction in swift::getInsertAfterPoint
1 parent 68ec810 commit 8431ceb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/SILOptimizer/Utils/InstOptUtils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ const std::function<void(SingleValueInstruction *, SILValue)>
7070
};
7171

7272
Optional<SILBasicBlock::iterator> swift::getInsertAfterPoint(SILValue val) {
73-
if (isa<SingleValueInstruction>(val)) {
74-
return std::next(cast<SingleValueInstruction>(val)->getIterator());
73+
if (auto *inst = val->getDefiningInstruction()) {
74+
return std::next(inst->getIterator());
7575
}
7676
if (isa<SILArgument>(val)) {
7777
return cast<SILArgument>(val)->getParentBlock()->begin();

0 commit comments

Comments
 (0)