@@ -1056,7 +1056,8 @@ class IRGenSILFunction :
10561056 template <typename StorageType>
10571057 void emitDebugVariableDeclaration (StorageType Storage, DebugTypeInfo Ty,
10581058 SILType SILTy, const SILDebugScope *DS,
1059- VarDecl *VarDecl, SILDebugVariable VarInfo,
1059+ SILLocation VarLoc,
1060+ SILDebugVariable VarInfo,
10601061 IndirectionKind Indirection) {
10611062 // TODO: fix demangling for C++ types (SR-13223).
10621063 if (swift::TypeBase *ty = SILTy.getASTType ().getPointer ()) {
@@ -1072,10 +1073,10 @@ class IRGenSILFunction :
10721073 assert (IGM.DebugInfo && " debug info not enabled" );
10731074 if (VarInfo.ArgNo ) {
10741075 PrologueLocation AutoRestore (IGM.DebugInfo .get (), Builder);
1075- IGM.DebugInfo ->emitVariableDeclaration (Builder, Storage, Ty, DS, VarDecl ,
1076+ IGM.DebugInfo ->emitVariableDeclaration (Builder, Storage, Ty, DS, VarLoc ,
10761077 VarInfo, Indirection);
10771078 } else
1078- IGM.DebugInfo ->emitVariableDeclaration (Builder, Storage, Ty, DS, VarDecl ,
1079+ IGM.DebugInfo ->emitVariableDeclaration (Builder, Storage, Ty, DS, VarLoc ,
10791080 VarInfo, Indirection);
10801081 }
10811082
@@ -4596,7 +4597,7 @@ void IRGenSILFunction::emitErrorResultVar(CanSILFunctionType FnTy,
45964597 ErrorResultSlot->getType (), IGM.getPointerSize (),
45974598 IGM.getPointerAlignment ());
45984599 IGM.DebugInfo ->emitVariableDeclaration (Builder, Storage, DbgTy,
4599- getDebugScope (), nullptr , *Var,
4600+ getDebugScope (), {} , *Var,
46004601 IndirectValue, ArtificialValue);
46014602}
46024603
@@ -4757,7 +4758,7 @@ void IRGenSILFunction::visitDebugValueInst(DebugValueInst *i) {
47574758 InCoroContext (*CurSILFn, *i) ? CoroDirectValue : DirectValue;
47584759
47594760 emitDebugVariableDeclaration (Copy, DbgTy, SILTy, i->getDebugScope (),
4760- i->getDecl (), *VarInfo, Indirection);
4761+ i->getLoc (), *VarInfo, Indirection);
47614762}
47624763
47634764void IRGenSILFunction::visitDebugValueAddrInst (DebugValueAddrInst *i) {
@@ -4805,7 +4806,7 @@ void IRGenSILFunction::visitDebugValueAddrInst(DebugValueAddrInst *i) {
48054806 // intrinsic.
48064807 emitDebugVariableDeclaration (
48074808 emitShadowCopyIfNeeded (Addr, i->getDebugScope (), *VarInfo, IsAnonymous),
4808- DbgTy, SILType (), i->getDebugScope (), Decl , *VarInfo, Indirection);
4809+ DbgTy, SILType (), i->getDebugScope (), i-> getLoc () , *VarInfo, Indirection);
48094810}
48104811
48114812void IRGenSILFunction::visitFixLifetimeInst (swift::FixLifetimeInst *i) {
@@ -5152,7 +5153,8 @@ void IRGenSILFunction::emitDebugInfoForAllocStack(AllocStackInst *i,
51525153
51535154 bindArchetypes (DbgTy.getType ());
51545155 if (IGM.DebugInfo )
5155- emitDebugVariableDeclaration (addr, DbgTy, SILTy, DS, Decl, *VarInfo,
5156+ emitDebugVariableDeclaration (addr, DbgTy, SILTy, DS,
5157+ i->getLoc (), *VarInfo,
51565158 Indirection);
51575159}
51585160
@@ -5366,7 +5368,7 @@ void IRGenSILFunction::visitAllocBoxInst(swift::AllocBoxInst *i) {
53665368 return ;
53675369
53685370 IGM.DebugInfo ->emitVariableDeclaration (
5369- Builder, Storage, DbgTy, i->getDebugScope (), Decl , *VarInfo,
5371+ Builder, Storage, DbgTy, i->getDebugScope (), i-> getLoc () , *VarInfo,
53705372 InCoroContext (*CurSILFn, *i) ? CoroIndirectValue : IndirectValue);
53715373}
53725374
0 commit comments