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:
@@ -382,7 +382,7 @@ static void
|
||||
rewriteApplyInstToCallNewFunction(FunctionAnalyzer &Analyzer, SILFunction *NewF,
|
||||
CallGraphNode::CallerCallSiteList CallSites) {
|
||||
for (ApplyInst *AI : CallSites) {
|
||||
SILBuilder Builder(AI);
|
||||
SILBuilderWithScope<16> Builder(AI);
|
||||
|
||||
FunctionRefInst *FRI = Builder.createFunctionRef(AI->getLoc(), NewF);
|
||||
|
||||
@@ -429,7 +429,7 @@ static void createThunkBody(SILBasicBlock *BB, SILFunction *NewF,
|
||||
FunctionAnalyzer &Analyzer) {
|
||||
// TODO: What is the proper location to use here?
|
||||
SILLocation Loc = BB->getParent()->getLocation();
|
||||
SILBuilder Builder(BB);
|
||||
SILBuilderWithScope<16> Builder(BB, NewF->getDebugScope());
|
||||
|
||||
FunctionRefInst *FRI = Builder.createFunctionRef(Loc, NewF);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user