mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Debug info: Properly handle the function prologue in the line table.
Introduces a new flag in SILLocation: InPrologue to mark instructions that setup the stack and allocate storage for local variables/arguments. Fixes rdar://problem/15290023: Breakpoint set on prologue - crash ensues. Swift SVN r9686
This commit is contained in:
@@ -317,6 +317,7 @@ public:
|
||||
auto initVar = gen.emitLocalVariableWithCleanup(vd);
|
||||
|
||||
// Initialize with the value from the inout.
|
||||
loc.markAsPrologue();
|
||||
gen.B.createCopyAddr(loc, address, initVar->getAddress(),
|
||||
IsNotTake, IsInitialization);
|
||||
initVar->finishInitialization(gen);
|
||||
@@ -495,6 +496,7 @@ struct ArgumentInitVisitor :
|
||||
SILValue makeArgumentInto(Type ty, SILBasicBlock *parent,
|
||||
SILLocation loc, Initialization *I) {
|
||||
assert(ty && "no type?!");
|
||||
loc.markAsPrologue();
|
||||
SILValue arg = makeArgument(ty, parent, loc);
|
||||
storeArgumentInto(ty, arg, loc, I);
|
||||
return arg;
|
||||
|
||||
Reference in New Issue
Block a user