Skip to content

Commit 572894c

Browse files
committed
---
yaml --- r: 348125 b: refs/heads/master c: 23a671b h: refs/heads/master i: 348123: 14d43ca
1 parent 4b318b9 commit 572894c

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 6b774094c27db56531e60c22c66afdea094da6c2
2+
refs/heads/master: 23a671bce4c0e87ef82b7480616629717d027875
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/include/swift/SIL/SILBuilder.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2232,6 +2232,9 @@ class SILBuilderWithScope : public SILBuilder {
22322232
explicit SILBuilderWithScope(SILBasicBlock::iterator I)
22332233
: SILBuilderWithScope(&*I) {}
22342234

2235+
explicit SILBuilderWithScope(SILBasicBlock::iterator I, SILBuilder &B)
2236+
: SILBuilder(&*I, &*I->getDebugScope(), B.getBuilderContext()) {}
2237+
22352238
explicit SILBuilderWithScope(SILInstruction *I,
22362239
SILInstruction *InheritScopeFrom)
22372240
: SILBuilderWithScope(I) {

trunk/lib/SILOptimizer/Utils/SILInliner.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -563,14 +563,16 @@ SILValue SILInlineCloner::borrowFunctionArgument(SILValue callArg,
563563
SILBuilderWithScope beginBuilder(AI.getInstruction(), getBuilder());
564564
auto *borrow = beginBuilder.createBeginBorrow(AI.getLoc(), callArg);
565565
if (auto *tryAI = dyn_cast<TryApplyInst>(AI)) {
566-
SILBuilderWithScope returnBuilder(tryAI->getNormalBB()->begin());
566+
SILBuilderWithScope returnBuilder(tryAI->getNormalBB()->begin(),
567+
getBuilder());
567568
returnBuilder.createEndBorrow(AI.getLoc(), borrow, callArg);
568569

569-
SILBuilderWithScope throwBuilder(tryAI->getErrorBB()->begin());
570+
SILBuilderWithScope throwBuilder(tryAI->getErrorBB()->begin(),
571+
getBuilder());
570572
throwBuilder.createEndBorrow(AI.getLoc(), borrow, callArg);
571573
} else {
572574
SILBuilderWithScope returnBuilder(
573-
std::next(AI.getInstruction()->getIterator()));
575+
std::next(AI.getInstruction()->getIterator()), getBuilder());
574576
returnBuilder.createEndBorrow(AI.getLoc(), borrow, callArg);
575577
}
576578
return borrow;

0 commit comments

Comments
 (0)