diff options
author | Devang Patel <dpatel@apple.com> | 2011-02-24 21:04:00 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-02-24 21:04:00 +0000 |
commit | f410608271b6318bfc9e26c0d199f185d5a89ccb (patch) | |
tree | 657e0f50bc3d75837e1154ebdd71aa190d7acc2b /lib/CodeGen/AsmPrinter/DIE.cpp | |
parent | 8c20ec54d98176d31f310e4684d1d7f2ea0639bc (diff) |
Enable DebugInfo support for COFF object files.
Patch by Nathan Jeffords!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126425 91177308-0d34-0410-b5e6-96231b3b80d8
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 //===----------------------------------------------------------------------===// |