X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=lib%2FCodeGen%2FAsmPrinter%2FDwarfUnit.cpp;h=1b1d3edcc7edad7065a53bb38da28606c3dcc5bf;hp=902c9c248c5633cd8ba89e451c8d0c352cd4d582;hb=33e07581b22ed472103c91a246dab5b8ce08a1c7;hpb=cfe761c9e6cf97dc804725df08247b9402085f84 diff --git a/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/lib/CodeGen/AsmPrinter/DwarfUnit.cpp index 902c9c248c5..1b1d3edcc7e 100644 --- a/lib/CodeGen/AsmPrinter/DwarfUnit.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfUnit.cpp @@ -1745,6 +1745,15 @@ void DwarfUnit::emitHeader(const MCSymbol *ASectionSym) const { Asm->EmitInt8(Asm->getDataLayout().getPointerSize()); } +void DwarfUnit::initSection(const MCSection *Section) { + assert(!this->Section); + this->Section = Section; + this->LabelBegin = + Asm->GetTempSymbol(Section->getLabelBeginName(), getUniqueID()); + this->LabelEnd = + Asm->GetTempSymbol(Section->getLabelEndName(), getUniqueID()); +} + void DwarfTypeUnit::emitHeader(const MCSymbol *ASectionSym) const { DwarfUnit::emitHeader(ASectionSym); Asm->OutStreamer.AddComment("Type Signature"); @@ -1755,16 +1764,3 @@ void DwarfTypeUnit::emitHeader(const MCSymbol *ASectionSym) const { sizeof(Ty->getOffset())); } -void DwarfTypeUnit::initSection(const MCSection *Section) { - assert(!this->Section); - this->Section = Section; - // Since each type unit is contained in its own COMDAT section, the begin - // label and the section label are the same. Using the begin label emission in - // DwarfDebug to emit the section label as well is slightly subtle/sneaky, but - // the only other alternative of lazily constructing start-of-section labels - // and storing a mapping in DwarfDebug (or AsmPrinter). - this->SectionSym = this->LabelBegin = - Asm->GetTempSymbol(Section->getLabelBeginName(), getUniqueID()); - this->LabelEnd = - Asm->GetTempSymbol(Section->getLabelEndName(), getUniqueID()); -}