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 | b037383a35660151cc2a8814c0854a6b65039925 (patch) | |
tree | 917246738524d5a8dd6edd4b8705bab59b2b11e2 /llvm/lib/CodeGen/AsmPrinter/DIE.cpp | |
parent | 502f1b943f54728efdae52362b4b1a46dba57d7b (diff) | |
download | bcm5719-llvm-b037383a35660151cc2a8814c0854a6b65039925.tar.gz bcm5719-llvm-b037383a35660151cc2a8814c0854a6b65039925.zip |
Enable DebugInfo support for COFF object files.
Patch by Nathan Jeffords!
llvm-svn: 126425
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DIE.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DIE.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DIE.cpp b/llvm/lib/CodeGen/AsmPrinter/DIE.cpp index 21396ca37f0..ff3c6da084b 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DIE.cpp +++ b/llvm/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 //===----------------------------------------------------------------------===// |