[llvm] r243857 - DwarfLinker: Use DIEValueList instead of DIE, NFC

Duncan P. N. Exon Smith dexonsmith at apple.com
Sun Aug 2 13:48:47 PDT 2015


Author: dexonsmith
Date: Sun Aug  2 15:48:47 2015
New Revision: 243857

URL: http://llvm.org/viewvc/llvm-project?rev=243857&view=rev
Log:
DwarfLinker: Use DIEValueList instead of DIE, NFC

Use `DIEValueList` as a pointer to either `DIEBlock` or `DIELoc` instead
of `DIE`, since soon they won't inherit from the latter.

Modified:
    llvm/trunk/tools/dsymutil/DwarfLinker.cpp

Modified: llvm/trunk/tools/dsymutil/DwarfLinker.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/dsymutil/DwarfLinker.cpp?rev=243857&r1=243856&r2=243857&view=diff
==============================================================================
--- llvm/trunk/tools/dsymutil/DwarfLinker.cpp (original)
+++ llvm/trunk/tools/dsymutil/DwarfLinker.cpp Sun Aug  2 15:48:47 2015
@@ -2323,7 +2323,7 @@ unsigned DwarfLinker::cloneDieReferenceA
 unsigned DwarfLinker::cloneBlockAttribute(DIE &Die, AttributeSpec AttrSpec,
                                           const DWARFFormValue &Val,
                                           unsigned AttrSize) {
-  DIE *Attr;
+  DIEValueList *Attr;
   DIEValue Value;
   DIELoc *Loc = nullptr;
   DIEBlock *Block = nullptr;
@@ -2335,7 +2335,8 @@ unsigned DwarfLinker::cloneBlockAttribut
     Block = new (DIEAlloc) DIEBlock;
     DIEBlocks.push_back(Block);
   }
-  Attr = Loc ? static_cast<DIE *>(Loc) : static_cast<DIE *>(Block);
+  Attr = Loc ? static_cast<DIEValueList *>(Loc)
+             : static_cast<DIEValueList *>(Block);
 
   if (Loc)
     Value = DIEValue(dwarf::Attribute(AttrSpec.Attr),





More information about the llvm-commits mailing list