DwarfLinker: Use DIEValueList instead of DIE, NFC
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sun, 2 Aug 2015 20:48:47 +0000 (20:48 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sun, 2 Aug 2015 20:48:47 +0000 (20:48 +0000)
Use `DIEValueList` as a pointer to either `DIEBlock` or `DIELoc` instead
of `DIE`, since soon they won't inherit from the latter.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243857 91177308-0d34-0410-b5e6-96231b3b80d8

tools/dsymutil/DwarfLinker.cpp

index 484c86aa5df256a52e0191f8cdc4a24cd4b45d86..68618bc3371ed3e7cff99c03b6b3526a42e3f92c 100644 (file)
@@ -2323,7 +2323,7 @@ unsigned DwarfLinker::cloneDieReferenceAttribute(
 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::cloneBlockAttribute(DIE &Die, AttributeSpec AttrSpec,
     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),