[llvm] r221060 - Make DwarfCompileUnit::Skeleton more narrowly typed (DwarfCompileUnit* instead of DwarfUnit*) now that it's specific to DwarfCompileUnit anyway.

David Blaikie dblaikie at gmail.com
Sat Nov 1 12:26:06 PDT 2014


Author: dblaikie
Date: Sat Nov  1 14:26:05 2014
New Revision: 221060

URL: http://llvm.org/viewvc/llvm-project?rev=221060&view=rev
Log:
Make DwarfCompileUnit::Skeleton more narrowly typed (DwarfCompileUnit* instead of DwarfUnit*) now that it's specific to DwarfCompileUnit anyway.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h?rev=221060&r1=221059&r2=221060&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h Sat Nov  1 14:26:05 2014
@@ -34,7 +34,7 @@ class DwarfCompileUnit : public DwarfUni
   unsigned stmtListIndex;
 
   /// Skeleton unit associated with this unit.
-  DwarfUnit *Skeleton;
+  DwarfCompileUnit *Skeleton;
 
   /// \brief Construct a DIE for the given DbgVariable without initializing the
   /// DbgVariable's DIE reference.
@@ -46,7 +46,7 @@ public:
                    DwarfDebug *DW, DwarfFile *DWU);
 
   DwarfCompileUnit *getSkeleton() const {
-    return static_cast<DwarfCompileUnit *>(Skeleton);
+    return Skeleton;
   }
 
   void initStmtList(MCSymbol *DwarfLineSectionSym);
@@ -155,7 +155,7 @@ public:
   }
 
   /// Set the skeleton unit associated with this unit.
-  void setSkeleton(DwarfUnit &Skel) { Skeleton = &Skel; }
+  void setSkeleton(DwarfCompileUnit &Skel) { Skeleton = &Skel; }
 };
 
 } // end llvm namespace





More information about the llvm-commits mailing list