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:
@@ -35,7 +35,8 @@ IRGenFunction::IRGenFunction(IRGenModule &IGM,
|
||||
Optional<SILLocation> DbgLoc)
|
||||
: IGM(IGM), Builder(IGM.getLLVMContext()),
|
||||
CurFn(Fn), CurExplosionLevel(explosionLevel),
|
||||
ContextPtr(nullptr) {
|
||||
ContextPtr(nullptr),
|
||||
DbgScope(DbgScope) {
|
||||
// Make sure the instructions in this function are attached its debug scope.
|
||||
if (IGM.DebugInfo) {
|
||||
// Functions, especially artificial thunks and closures, are often
|
||||
@@ -43,7 +44,6 @@ IRGenFunction::IRGenFunction(IRGenModule &IGM,
|
||||
// function. Be nice and preserve the current debug location until
|
||||
// after we're done with this function.
|
||||
IGM.DebugInfo->pushLoc();
|
||||
IGM.DebugInfo->setCurrentLoc(Builder, DbgScope, DbgLoc);
|
||||
}
|
||||
|
||||
emitPrologue();
|
||||
|
||||
Reference in New Issue
Block a user