X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=lib%2FCodeGen%2FAsmPrinter%2FDwarfDebug.cpp;h=5f2d15e257ec9d979fd029a2a849d7b6b369bc86;hp=a19750a4904edf0fb888775178dac3bae48bfd9b;hb=2c9ba7b7b1a4f7ef9318f67ab22e6e78cdbb2a7e;hpb=a2ec9db66b068d327deb94ad8661209d1476c5ba diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index a19750a4904..5f2d15e257e 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -318,7 +318,7 @@ DIE &DwarfDebug::updateSubprogramScopeDIE(DwarfCompileUnit &SPCU, DISubprogram SP) { DIE *SPDie = SPCU.getOrCreateSubprogramDIE(SP); - attachLowHighPC(SPCU, *SPDie, FunctionBeginSym, FunctionEndSym); + SPCU.attachLowHighPC(*SPDie, FunctionBeginSym, FunctionEndSym); if (!CurFn->getTarget().Options.DisableFramePointerElim(*CurFn)) SPCU.addFlag(*SPDie, dwarf::DW_AT_APPLE_omit_frame_ptr); @@ -394,8 +394,8 @@ void DwarfDebug::attachRangesOrLowHighPC(DwarfCompileUnit &TheCU, DIE &Die, const SmallVectorImpl &Ranges) { assert(!Ranges.empty()); if (Ranges.size() == 1) - attachLowHighPC(TheCU, Die, getLabelBeforeInsn(Ranges.front().first), - getLabelAfterInsn(Ranges.front().second)); + TheCU.attachLowHighPC(Die, getLabelBeforeInsn(Ranges.front().first), + getLabelAfterInsn(Ranges.front().second)); else addScopeRangeList(TheCU, Die, Ranges); } @@ -977,7 +977,7 @@ void DwarfDebug::finalizeModuleInfo() { 0); } else { RangeSpan &Range = TheU->getRanges().back(); - attachLowHighPC(U, U.getUnitDie(), Range.getStart(), Range.getEnd()); + U.attachLowHighPC(U.getUnitDie(), Range.getStart(), Range.getEnd()); } } } @@ -2636,20 +2636,6 @@ void DwarfDebug::addDwarfTypeUnitType(DwarfCompileUnit &CU, CU.addDIETypeSignature(RefDie, NewTU); } -void DwarfDebug::attachLowHighPC(DwarfCompileUnit &Unit, DIE &D, - const MCSymbol *Begin, const MCSymbol *End) { - assert(Begin && "Begin label should not be null!"); - assert(End && "End label should not be null!"); - assert(Begin->isDefined() && "Invalid starting label"); - assert(End->isDefined() && "Invalid end label"); - - Unit.addLabelAddress(D, dwarf::DW_AT_low_pc, Begin); - if (DwarfVersion < 4) - Unit.addLabelAddress(D, dwarf::DW_AT_high_pc, End); - else - Unit.addLabelDelta(D, dwarf::DW_AT_high_pc, End, Begin); -} - // Accelerator table mutators - add each name along with its companion // DIE to the proper table while ensuring that the name that we're going // to reference is in the string table. We do this since the names we