diff options
author | Stuart Hastings <stuart@apple.com> | 2010-07-08 23:25:39 +0000 |
---|---|---|
committer | Stuart Hastings <stuart@apple.com> | 2010-07-08 23:25:39 +0000 |
commit | 99cfb69f17ccf6dca7378fe6d1c60758e5cabd1f (patch) | |
tree | 4aa019e6e53e983da30e8516fa664ee670ccb490 /lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | 21e9445952d12ac4ec72ff59506e2b78e469f208 (diff) |
Reverting r107918 and r107919. Radar 8063111.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107930 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 2e9ba40f6e..65c1d19021 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -2682,21 +2682,18 @@ 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, TheScope); + recordSourceLine(Line, Col, Scope); /// ProcessedArgs - Collection of arguments already processed. SmallPtrSet<const MDNode *, 8> ProcessedArgs; @@ -2902,6 +2899,16 @@ 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)); |