[PATCH] D27634: Make a DWARFDIE class that can help avoid using the wrong DWARFUnit when extracting attributes

Greg Clayton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 9 16:18:32 PST 2016


clayborg updated this revision to Diff 80972.
clayborg added a comment.

Fixed some issues that David Blaikie mentioned on the mailing list: add asserts to functions in DWARFDie that return things like the getOffset(), getTag(), hasChildren() and a few others. Users should check a DWARFDie for validity before using it.


https://reviews.llvm.org/D27634

Files:
  include/llvm/DebugInfo/DWARF/DWARFDebugInfoEntry.h
  include/llvm/DebugInfo/DWARF/DWARFDie.h
  include/llvm/DebugInfo/DWARF/DWARFUnit.h
  lib/DebugInfo/DWARF/CMakeLists.txt
  lib/DebugInfo/DWARF/DWARFCompileUnit.cpp
  lib/DebugInfo/DWARF/DWARFContext.cpp
  lib/DebugInfo/DWARF/DWARFDebugInfoEntry.cpp
  lib/DebugInfo/DWARF/DWARFDie.cpp
  lib/DebugInfo/DWARF/DWARFTypeUnit.cpp
  lib/DebugInfo/DWARF/DWARFUnit.cpp
  tools/dsymutil/DwarfLinker.cpp
  unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
  unittests/DebugInfo/DWARF/DwarfGenerator.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27634.80972.patch
Type: text/x-patch
Size: 125353 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161210/c748f307/attachment.bin>


More information about the llvm-commits mailing list