mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Fix decl/def debug info for template functions. Radar 8063111.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107919 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -2682,18 +2682,21 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) {
|
||||
if (FDL.isUnknown()) return;
|
||||
|
||||
const MDNode *Scope = FDL.getScope(MF->getFunction()->getContext());
|
||||
const MDNode *TheScope = 0;
|
||||
|
||||
DISubprogram SP = getDISubprogram(Scope);
|
||||
unsigned Line, Col;
|
||||
if (SP.Verify()) {
|
||||
Line = SP.getLineNumber();
|
||||
Col = 0;
|
||||
TheScope = SP;
|
||||
} else {
|
||||
Line = FDL.getLine();
|
||||
Col = FDL.getCol();
|
||||
TheScope = Scope;
|
||||
}
|
||||
|
||||
recordSourceLine(Line, Col, Scope);
|
||||
recordSourceLine(Line, Col, TheScope);
|
||||
|
||||
/// ProcessedArgs - Collection of arguments already processed.
|
||||
SmallPtrSet<const MDNode *, 8> ProcessedArgs;
|
||||
@@ -2899,16 +2902,6 @@ MCSymbol *DwarfDebug::recordSourceLine(unsigned Line, unsigned Col,
|
||||
Src = GetOrCreateSourceID(Dir, Fn);
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (!Lines.empty()) {
|
||||
SrcLineInfo lastSrcLineInfo = Lines.back();
|
||||
// Emitting sequential line records with the same line number (but
|
||||
// different addresses) seems to confuse GDB. Avoid this.
|
||||
if (lastSrcLineInfo.getLine() == Line)
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
MCSymbol *Label = MMI->getContext().CreateTempSymbol();
|
||||
Lines.push_back(SrcLineInfo(Line, Col, Src, Label));
|
||||
|
||||
|
Reference in New Issue
Block a user