diff options
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DIE.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DIE.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/DIE.cpp b/lib/CodeGen/AsmPrinter/DIE.cpp index 21396ca37f..ff3c6da084 100644 --- a/lib/CodeGen/AsmPrinter/DIE.cpp +++ b/lib/CodeGen/AsmPrinter/DIE.cpp @@ -277,6 +277,29 @@ void DIELabel::print(raw_ostream &O) { #endif //===----------------------------------------------------------------------===// +// DIESectionOffset Implementation +//===----------------------------------------------------------------------===// + +/// EmitValue - Emit label value. +/// +void DIESectionOffset::EmitValue(AsmPrinter *AP, unsigned Form) const { + AP->EmitSectionOffset (Label, Label); +} + +/// SizeOf - Determine size of label value in bytes. +/// +unsigned DIESectionOffset::SizeOf(AsmPrinter *AP, unsigned Form) const { + if (Form == dwarf::DW_FORM_data4) return 4; + return AP->getTargetData().getPointerSize(); +} + +#ifndef NDEBUG +void DIESectionOffset::print(raw_ostream &O) { + O << "SecRelLbl: " << Label->getName(); +} +#endif + +//===----------------------------------------------------------------------===// // DIEDelta Implementation //===----------------------------------------------------------------------===// |