Elaborate on comment.
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DIE.h
index 412c09c6c8e51c9ff7fff82f053813e6ad65ab16..3b04e206254b728a41ea55c8399d59442b6d973c 100644 (file)
@@ -365,9 +365,13 @@ namespace llvm {
     /// SizeOf - Determine size of debug information entry in bytes.
     ///
     virtual unsigned SizeOf(AsmPrinter *AP, unsigned Form) const {
-      return sizeof(int32_t);
+      return Form == dwarf::DW_FORM_ref_addr ? getRefAddrSize(AP) :
+                                               sizeof(int32_t);
     }
 
+    /// Returns size of a ref_addr entry.
+    static unsigned getRefAddrSize(AsmPrinter *AP);
+
     // Implement isa/cast/dyncast.
     static bool classof(const DIEValue *E) { return E->getType() == isEntry; }