diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-09 00:31:02 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-09 00:31:02 +0000 |
commit | 6ed0f90dacc7c42b48019ad035fc2767adeaf04a (patch) | |
tree | d885222d721efbb2d5b817271af0528c2fca08a0 /lib/CodeGen/AsmPrinter/DwarfDebug.cpp | |
parent | b9dc5f7b580951d51cb32b56b769ccda0647a7f6 (diff) |
make InlineInfoLabels hold MCSymbol*'s, avoiding
recomputation of the labels.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98016 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 62c0d2183c..7ca94de980 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1405,8 +1405,9 @@ DIE *DwarfDebug::constructInlinedScopeDIE(DbgScope *Scope) { addDIEEntry(ScopeDIE, dwarf::DW_AT_abstract_origin, dwarf::DW_FORM_ref4, OriginDIE); - addLabel(ScopeDIE, dwarf::DW_AT_low_pc, dwarf::DW_FORM_addr, - getDWLabel("label", StartID)); + MCSymbol *StartLabel = getDWLabel("label", StartID); + + addLabel(ScopeDIE, dwarf::DW_AT_low_pc, dwarf::DW_FORM_addr, StartLabel); addLabel(ScopeDIE, dwarf::DW_AT_high_pc, dwarf::DW_FORM_addr, getDWLabel("label", EndID)); @@ -1417,11 +1418,11 @@ DIE *DwarfDebug::constructInlinedScopeDIE(DbgScope *Scope) { I = InlineInfo.find(InlinedSP.getNode()); if (I == InlineInfo.end()) { - InlineInfo[InlinedSP.getNode()].push_back(std::make_pair(StartID, + InlineInfo[InlinedSP.getNode()].push_back(std::make_pair(StartLabel, ScopeDIE)); InlinedSPNodes.push_back(InlinedSP.getNode()); } else - I->second.push_back(std::make_pair(StartID, ScopeDIE)); + I->second.push_back(std::make_pair(StartLabel, ScopeDIE)); StringPool.insert(InlinedSP.getName()); StringPool.insert(getRealLinkageName(InlinedSP.getLinkageName())); @@ -2965,13 +2966,12 @@ void DwarfDebug::emitDebugInlineInfo() { for (SmallVector<InlineInfoLabels, 4>::iterator LI = Labels.begin(), LE = Labels.end(); LI != LE; ++LI) { - DIE *SP = LI->second; - Asm->EmitInt32(SP->getOffset()); EOL("DIE offset"); + if (Asm->VerboseAsm) Asm->OutStreamer.AddComment("DIE offset"); + Asm->EmitInt32(LI->second->getOffset()); - // FIXME: "Labels" should hold MCSymbol*'s - MCSymbol *L = getDWLabel("label", LI->first); if (Asm->VerboseAsm) Asm->OutStreamer.AddComment("low_pc"); - Asm->OutStreamer.EmitValue(MCSymbolRefExpr::Create(L, Asm->OutContext), + Asm->OutStreamer.EmitValue(MCSymbolRefExpr::Create(LI->first, + Asm->OutContext), TD->getPointerSize(), 0/*AddrSpace*/); } } |