Skip to content

Commit 20a6d35

Browse files
committed
Fix a case of ArrayRef capturing compiler temps.
Fixes rdar://28684618
1 parent 6c71745 commit 20a6d35

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/SILOptimizer/Transforms/SimplifyCFG.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1601,7 +1601,8 @@ bool SimplifyCFG::simplifySwitchEnumUnreachableBlocks(SwitchEnumInst *SEI) {
16011601
.createUncheckedEnumData(SEI->getLoc(), SEI->getOperand(), Element, Ty);
16021602

16031603
assert(Dest->bbarg_size() == 1 && "Expected only one argument!");
1604-
ArrayRef<SILValue> Args = { UED };
1604+
SmallVector<SILValue, 1> Args;
1605+
Args.push_back(UED);
16051606
SILBuilderWithScope(SEI).createBranch(SEI->getLoc(), Dest, Args);
16061607

16071608
addToWorklist(SEI->getParent());

0 commit comments

Comments
 (0)