[llvm] r221075 - Sink DwarfUnit::LabelBegin down into DwarfCompileUnit since that's the only place it's needed.
David Blaikie
dblaikie at gmail.com
Sat Nov 1 18:21:40 PDT 2014
Author: dblaikie
Date: Sat Nov 1 20:21:40 2014
New Revision: 221075
URL: http://llvm.org/viewvc/llvm-project?rev=221075&view=rev
Log:
Sink DwarfUnit::LabelBegin down into DwarfCompileUnit since that's the only place it's needed.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.h
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h?rev=221075&r1=221074&r2=221075&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h Sat Nov 1 20:21:40 2014
@@ -39,6 +39,9 @@ class DwarfCompileUnit : public DwarfUni
/// A label at the start of the non-dwo section related to this unit.
MCSymbol *SectionSym;
+ /// The start of the unit within its section.
+ MCSymbol *LabelBegin;
+
/// \brief Construct a DIE for the given DbgVariable without initializing the
/// DbgVariable's DIE reference.
std::unique_ptr<DIE> constructVariableDIEImpl(const DbgVariable &DV,
@@ -171,6 +174,8 @@ public:
void initSection(const MCSection *Section, MCSymbol *SectionSym) {
DwarfUnit::initSection(Section);
this->SectionSym = SectionSym;
+ LabelBegin =
+ Asm->GetTempSymbol(Section->getLabelBeginName(), getUniqueID());
}
unsigned getLength() {
@@ -179,6 +184,11 @@ public:
}
void emitHeader(const MCSymbol *ASectionSym) const override;
+
+ MCSymbol *getLabelBegin() const {
+ assert(Section);
+ return LabelBegin;
+ }
};
} // end llvm namespace
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp?rev=221075&r1=221074&r2=221075&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp Sat Nov 1 20:21:40 2014
@@ -1752,8 +1752,6 @@ void DwarfUnit::emitHeader(const MCSymbo
void DwarfUnit::initSection(const MCSection *Section) {
assert(!this->Section);
this->Section = Section;
- this->LabelBegin =
- Asm->GetTempSymbol(Section->getLabelBeginName(), getUniqueID());
}
void DwarfTypeUnit::emitHeader(const MCSymbol *ASectionSym) const {
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.h?rev=221075&r1=221074&r2=221075&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.h Sat Nov 1 20:21:40 2014
@@ -129,9 +129,6 @@ protected:
/// The section this unit will be emitted in.
const MCSection *Section;
- /// The start of the unit within its section.
- MCSymbol *LabelBegin;
-
DwarfUnit(unsigned UID, dwarf::Tag, DICompileUnit CU, AsmPrinter *A,
DwarfDebug *DW, DwarfFile *DWU);
@@ -144,11 +141,6 @@ public:
return Section;
}
- MCSymbol *getLabelBegin() const {
- assert(Section);
- return LabelBegin;
- }
-
// Accessors.
unsigned getUniqueID() const { return UniqueID; }
uint16_t getLanguage() const { return CUNode.getLanguage(); }
More information about the llvm-commits
mailing list