[llvm-commits] CVS: llvm/lib/CodeGen/DwarfWriter.cpp

Jim Laskey jlaskey at apple.com
Thu Nov 9 08:32:41 PST 2006



Changes in directory llvm/lib/CodeGen:

DwarfWriter.cpp updated: 1.100 -> 1.101
---
Log message:

Allows debugging llc self hosted.

---
Diffs of the changes:  (+7 -2)

 DwarfWriter.cpp |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)


Index: llvm/lib/CodeGen/DwarfWriter.cpp
diff -u llvm/lib/CodeGen/DwarfWriter.cpp:1.100 llvm/lib/CodeGen/DwarfWriter.cpp:1.101
--- llvm/lib/CodeGen/DwarfWriter.cpp:1.100	Thu Nov  9 08:52:14 2006
+++ llvm/lib/CodeGen/DwarfWriter.cpp	Thu Nov  9 10:32:26 2006
@@ -289,6 +289,7 @@
   unsigned   getAbbrevNumber()               const {
     return Abbrev.getNumber();
   }
+  unsigned getTag()                          const { return Abbrev.getTag(); }
   unsigned getOffset()                       const { return Offset; }
   unsigned getSize()                         const { return Size; }
   const std::vector<DIE *> &getChildren()    const { return Children; }
@@ -1438,8 +1439,12 @@
       Buffer.setTag(DW_TAG_base_type);
       AddUInt(&Buffer, DW_AT_encoding,  DW_FORM_data1, BasicTy->getEncoding());
     } else if (DerivedTypeDesc *DerivedTy = dyn_cast<DerivedTypeDesc>(TyDesc)) {
-      // Pointers, tyepdefs et al. 
-      Buffer.setTag(DerivedTy->getTag());
+      // Fetch tag.
+      unsigned Tag = DerivedTy->getTag();
+      // FIXME - Workaround for templates.
+      if (Tag == DW_TAG_inheritance) Tag = DW_TAG_reference_type;
+      // Pointers, typedefs et al. 
+      Buffer.setTag(Tag);
       // Map to main type, void will not have a type.
       if (TypeDesc *FromTy = DerivedTy->getFromType())
         AddType(&Buffer, FromTy, Unit);






More information about the llvm-commits mailing list