diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-11-01 23:07:14 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-11-01 23:07:14 +0000 |
commit | 983bfea0d0f7b35eb6824921bae6fb56db3c5437 (patch) | |
tree | e899d245231eec399028eb49d89f21a55b2040ef /llvm/lib | |
parent | e1c664b13680a06711c744cd9a7da93b1b759bdc (diff) | |
download | bcm5719-llvm-983bfea0d0f7b35eb6824921bae6fb56db3c5437.tar.gz bcm5719-llvm-983bfea0d0f7b35eb6824921bae6fb56db3c5437.zip |
Remove DwarfUnit::LabelEnd in favor of computing the length of the section directly
This was a compile-unit specific label (unused in type units) and seems
unnecessary anyway when we can more easily directly compute the size of
the compile unit.
llvm-svn: 221067
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h | 4 | ||||
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp | 1 | ||||
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h | 8 |
5 files changed, 5 insertions, 12 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h index dd59024e786..a84c81e0bf5 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h @@ -173,6 +173,10 @@ public: this->SectionSym = SectionSym; } + unsigned getLength() { + return sizeof(uint32_t) + // Length field + getHeaderSize() + UnitDie.getSize(); + } }; } // end llvm namespace diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index bbac4794aad..ce59debe235 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1598,7 +1598,7 @@ void DwarfDebug::emitDebugPubSection( Asm->EmitSectionOffset(TheU->getLabelBegin(), TheU->getSectionSym()); Asm->OutStreamer.AddComment("Compilation Unit Length"); - Asm->EmitLabelDifference(TheU->getLabelEnd(), TheU->getLabelBegin(), 4); + Asm->EmitInt32(TheU->getLength()); // Emit the pubnames for this compilation unit. for (const auto &GI : Globals) { diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp index d62e9bcc86c..89d38a2e3ae 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp @@ -65,7 +65,6 @@ void DwarfFile::emitUnits(const MCSymbol *ASectionSym) { TheU->emitHeader(ASectionSym); DD.emitDIE(Die); - Asm->OutStreamer.EmitLabel(TheU->getLabelEnd()); } } diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp index 1b1d3edcc7e..bdcb8cc11ee 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp @@ -1750,8 +1750,6 @@ void DwarfUnit::initSection(const MCSection *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 { diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h index 63fb79f0170..feb7ffa125a 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h @@ -132,9 +132,6 @@ protected: /// The start of the unit within its section. MCSymbol *LabelBegin; - /// The end of the unit within its section. - MCSymbol *LabelEnd; - DwarfUnit(unsigned UID, dwarf::Tag, DICompileUnit CU, AsmPrinter *A, DwarfDebug *DW, DwarfFile *DWU); @@ -152,11 +149,6 @@ public: return LabelBegin; } - MCSymbol *getLabelEnd() const { - assert(Section); - return LabelEnd; - } - // Accessors. unsigned getUniqueID() const { return UniqueID; } uint16_t getLanguage() const { return CUNode.getLanguage(); } |