X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FCodeGen%2FAsmPrinter%2FDwarfDebug.cpp;h=f4eb787adbf9bf3a2f13602c0711c7ae8b72f863;hb=667376028fc44bbcd861e6a70ff0e04b29f177d1;hp=17bb6857cdc926915419a541e0e48f099e8b38fd;hpb=bd86fbe0d721aaa949d9a7be25fa7ae4d89972b7;p=oota-llvm.git diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 17bb6857cdc..f4eb787adbf 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -501,8 +501,7 @@ DIE *DwarfDebug::constructLexicalScopeDIE(DwarfCompileUnit *TheCU, assert(Start->isDefined() && "Invalid starting label for an inlined scope!"); assert(End->isDefined() && "Invalid end label for an inlined scope!"); - TheCU->addLabelAddress(ScopeDIE, dwarf::DW_AT_low_pc, Start); - TheCU->addLabelAddress(ScopeDIE, dwarf::DW_AT_high_pc, End); + attachLowHighPC(TheCU, ScopeDIE, Start, End); return ScopeDIE; } @@ -1186,26 +1185,23 @@ bool DwarfDebug::addCurrentFnArgument(DbgVariable *Var, LexicalScope *Scope) { void DwarfDebug::collectVariableInfoFromMMITable( SmallPtrSet &Processed) { for (const auto &VI : MMI->getVariableDbgInfo()) { - const MDNode *Var = VI.first; - if (!Var) + if (!VI.Var) continue; - Processed.insert(Var); - DIVariable DV(Var); - const std::pair &VP = VI.second; - - LexicalScope *Scope = LScopes.findLexicalScope(VP.second); + Processed.insert(VI.Var); + DIVariable DV(VI.Var); + LexicalScope *Scope = LScopes.findLexicalScope(VI.Loc); // If variable scope is not found then skip this variable. if (Scope == 0) continue; - DbgVariable *AbsDbgVariable = findAbstractVariable(DV, VP.second); + DbgVariable *AbsDbgVariable = findAbstractVariable(DV, VI.Loc); DbgVariable *RegVar = new DbgVariable(DV, AbsDbgVariable, this); - RegVar->setFrameIndex(VP.first); + RegVar->setFrameIndex(VI.Slot); if (!addCurrentFnArgument(RegVar, Scope)) addScopeVariable(Scope, RegVar); if (AbsDbgVariable) - AbsDbgVariable->setFrameIndex(VP.first); + AbsDbgVariable->setFrameIndex(VI.Slot); } } @@ -2217,10 +2213,6 @@ void DwarfDebug::emitDebugPubNames(bool GnuStyle) { // Start the dwarf pubnames section. Asm->OutStreamer.SwitchSection(PSec); - // Emit a label so we can reference the beginning of this pubname section. - if (GnuStyle) - Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("gnu_pubnames", ID)); - // Emit the header. Asm->OutStreamer.AddComment("Length of Public Names Info"); MCSymbol *BeginLabel = Asm->GetTempSymbol("pubnames_begin", ID); @@ -2278,10 +2270,6 @@ void DwarfDebug::emitDebugPubTypes(bool GnuStyle) { // Start the dwarf pubtypes section. Asm->OutStreamer.SwitchSection(PSec); - // Emit a label so we can reference the beginning of this pubtype section. - if (GnuStyle) - Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("gnu_pubtypes", ID)); - // Emit the header. Asm->OutStreamer.AddComment("Length of Public Types Info"); MCSymbol *BeginLabel = Asm->GetTempSymbol("pubtypes_begin", ID);