mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Audit all SILPasses to ensure that new instructions are never created
without a valid SILDebugScope. An assertion in IRGenSIL prevents future optimizations from regressing in this regard. Introducing SILBuilderWithScope and SILBuilderwithPostprocess to ease the transition. This patch is large, but mostly mechanical. <rdar://problem/18494573> Swift: Debugger is not stopping at the set breakpoint Swift SVN r22978
This commit is contained in:
@@ -308,9 +308,11 @@ void DCE::replaceBranchWithJump(SILInstruction *Inst, SILBasicBlock *Block) {
|
||||
assert(!LiveValues.count(*A) && "Unexpected live block argument!");
|
||||
Args.push_back(SILUndef::get((*A)->getType(), (*A)->getModule()));
|
||||
}
|
||||
Branch = SILBuilder(Inst).createBranch(Inst->getLoc(), Block, Args);
|
||||
Branch = SILBuilder(Inst).createBranch(Inst->getLoc(), Block, Args)
|
||||
->setDebugScope(Inst->getDebugScope());
|
||||
} else {
|
||||
Branch = SILBuilder(Inst).createBranch(Inst->getLoc(), Block);
|
||||
Branch = SILBuilder(Inst).createBranch(Inst->getLoc(), Block)
|
||||
->setDebugScope(Inst->getDebugScope());
|
||||
}
|
||||
DEBUG(llvm::dbgs() << "Inserted unconditional branch:\n");
|
||||
DEBUG(Branch->dump());
|
||||
|
||||
Reference in New Issue
Block a user