summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DIE.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-02-24 21:04:00 +0000
committerDevang Patel <dpatel@apple.com>2011-02-24 21:04:00 +0000
commitb037383a35660151cc2a8814c0854a6b65039925 (patch)
tree917246738524d5a8dd6edd4b8705bab59b2b11e2 /llvm/lib/CodeGen/AsmPrinter/DIE.cpp
parent502f1b943f54728efdae52362b4b1a46dba57d7b (diff)
downloadbcm5719-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.cpp23
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
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud