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 | d08fb75aaa666fad253fd269dbe53c399a35f515 (patch) | |
| tree | b6d9fc4313d91cf08fd1d60cf510b31997f24175 /llvm/lib | |
| parent | 95887f9c5bfc743e1dbc1352ba34bb7f3c3410ea (diff) | |
| download | bcm5719-llvm-d08fb75aaa666fad253fd269dbe53c399a35f515.tar.gz bcm5719-llvm-d08fb75aaa666fad253fd269dbe53c399a35f515.zip | |
Reverting r107918 and r107919. Radar 8063111.
llvm-svn: 107930
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Analysis/DebugInfo.cpp | 11 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 15 |
2 files changed, 14 insertions, 12 deletions
diff --git a/llvm/lib/Analysis/DebugInfo.cpp b/llvm/lib/Analysis/DebugInfo.cpp index ca6c2e6d721..c8d0d22ec2e 100644 --- a/llvm/lib/Analysis/DebugInfo.cpp +++ b/llvm/lib/Analysis/DebugInfo.cpp @@ -1107,19 +1107,14 @@ DIVariable DIFactory::CreateComplexVariable(unsigned Tag, DIDescriptor Context, /// CreateBlock - This creates a descriptor for a lexical block with the /// specified parent VMContext. DILexicalBlock DIFactory::CreateLexicalBlock(DIDescriptor Context, - DIFile F, unsigned LineNo, - unsigned Col) { - // Defeat MDNode uniqing for lexical blocks. - static unsigned int unique_id = 0; + unsigned LineNo, unsigned Col) { Value *Elts[] = { GetTagConstant(dwarf::DW_TAG_lexical_block), Context, ConstantInt::get(Type::getInt32Ty(VMContext), LineNo), - ConstantInt::get(Type::getInt32Ty(VMContext), Col), - F, - ConstantInt::get(Type::getInt32Ty(VMContext), unique_id++) + ConstantInt::get(Type::getInt32Ty(VMContext), Col) }; - return DILexicalBlock(MDNode::get(VMContext, &Elts[0], 6)); + return DILexicalBlock(MDNode::get(VMContext, &Elts[0], 4)); } /// CreateNameSpace - This creates new descriptor for a namespace diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 2e9ba40f6ed..65c1d190216 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/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)); |

