mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Debug Info: Set the debug location for the function prologue to the decl of the function.
rdar://problem/14536357 Swift SVN r6576
This commit is contained in:
@@ -32,13 +32,14 @@ using namespace irgen;
|
||||
IRGenFunction::IRGenFunction(IRGenModule &IGM,
|
||||
ExplosionKind explosionLevel,
|
||||
llvm::Function *Fn,
|
||||
SILDebugScope *DS)
|
||||
SILDebugScope *DbgScope,
|
||||
SILLocation DbgLoc)
|
||||
: IGM(IGM), Builder(IGM.getLLVMContext()),
|
||||
CurFn(Fn), CurExplosionLevel(explosionLevel),
|
||||
ContextPtr(nullptr) {
|
||||
// Make sure the instructions in this function are attached its debug scope.
|
||||
if (IGM.DebugInfo)
|
||||
IGM.DebugInfo->setCurrentLoc(Builder, DS);
|
||||
IGM.DebugInfo->setCurrentLoc(Builder, DbgScope, DbgLoc);
|
||||
|
||||
emitPrologue();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user