diff options
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfCompileUnit.h')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfCompileUnit.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h index 4a59ec544d..8e2d69de72 100644 --- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h +++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h @@ -315,6 +315,17 @@ public: /// call insertDIE if MD is not null. DIE *createAndAddDIE(unsigned Tag, DIE &Parent, const MDNode *MD = NULL); + /// Compute the size of a header for this unit, not including the initial + /// length field. + unsigned getHeaderSize() const { + return sizeof(int16_t) + // DWARF version number + sizeof(int32_t) + // Offset Into Abbrev. Section + sizeof(int8_t); // Pointer Size (in bytes) + } + + /// Emit the header for this unit, not including the initial length field. + void emitHeader(const MCSection *ASection, const MCSymbol *ASectionSym); + private: /// constructTypeDIE - Construct basic type die from DIBasicType. void constructTypeDIE(DIE &Buffer, DIBasicType BTy); |