Enable DebugInfo support for COFF object files.
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DIE.cpp
index 21396ca37f065dc90b3eea635e61d65d5f7c44df..ff3c6da084b815a1ade18bea285103004c8ccf7f 100644 (file)
@@ -276,6 +276,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
 //===----------------------------------------------------------------------===//