summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-03-10 16:58:10 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-03-10 16:58:10 +0000
commit063d725fd78bbdeff0c5eecab3d1cfa906bd5d12 (patch)
tree2e4ddd2045d506435b4d0c9de8f5d9c060131c0d /llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
parentf1b0db154588760352b968d9134f930c77497614 (diff)
downloadbcm5719-llvm-063d725fd78bbdeff0c5eecab3d1cfa906bd5d12.tar.gz
bcm5719-llvm-063d725fd78bbdeff0c5eecab3d1cfa906bd5d12.zip
Store an optional section start label in MCSection.
This makes code that uses section relative expressions (debug info) simpler and less brittle. This is still a bit awkward as the symbol is created late and has to be stored in a mutable field. I will move the symbol creation earlier in the next patch. llvm-svn: 231802
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
index ea15ab025f7..c700b2a10b8 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h
@@ -120,7 +120,6 @@ protected:
DwarfUnit(unsigned UID, dwarf::Tag, DICompileUnit CU, AsmPrinter *A,
DwarfDebug *DW, DwarfFile *DWU);
- void initSection(const MCSection *Section);
/// Add a string attribute data and value.
void addLocalString(DIE &Die, dwarf::Attribute Attribute, StringRef Str);
@@ -132,6 +131,8 @@ protected:
public:
virtual ~DwarfUnit();
+ void initSection(const MCSection *Section);
+
const MCSection *getSection() const {
assert(Section);
return Section;
@@ -321,7 +322,7 @@ public:
}
/// Emit the header for this unit, not including the initial length field.
- virtual void emitHeader(const MCSymbol *ASectionSym);
+ virtual void emitHeader(bool UseOffsets);
virtual DwarfCompileUnit &getCU() = 0;
@@ -423,12 +424,11 @@ public:
void setType(const DIE *Ty) { this->Ty = Ty; }
/// Emit the header for this unit, not including the initial length field.
- void emitHeader(const MCSymbol *ASectionSym) override;
+ void emitHeader(bool UseOffsets) override;
unsigned getHeaderSize() const override {
return DwarfUnit::getHeaderSize() + sizeof(uint64_t) + // Type Signature
sizeof(uint32_t); // Type DIE Offset
}
- using DwarfUnit::initSection;
DwarfCompileUnit &getCU() override { return CU; }
};
} // end llvm namespace
OpenPOWER on IntegriCloud