[sil] Replace some nstances of SILBuilder(...) with SILBuilderWithScope(...).

The main thing to notice about these changes is that I always picked the debug
scope associated with the location we were using. They should always be in
sync.
This commit is contained in:
Michael Gottesman
2019-04-05 12:10:23 -07:00
parent e922d2923b
commit 8feb1a1000
3 changed files with 19 additions and 19 deletions

View File

@@ -220,7 +220,7 @@ SILBasicBlock *swift::splitEdge(TermInst *T, unsigned edgeIdx,
SmallVector<SILValue, 16> args;
getEdgeArgs(T, edgeIdx, edgeBB, args);
SILBuilder(edgeBB).createBranch(T->getLoc(), destBB, args);
SILBuilderWithScope(edgeBB, T).createBranch(T->getLoc(), destBB, args);
// Strip the arguments and rewire the branch in the source block.
changeBranchTarget(T, edgeIdx, edgeBB, /*PreserveArgs=*/false);