[DWARF] Fix reading 64-bit DWARF type units.
authorIgor Kudrin <ikudrin@accesssoftek.com>
Tue, 20 Aug 2019 12:52:32 +0000 (12:52 +0000)
committerIgor Kudrin <ikudrin@accesssoftek.com>
Tue, 20 Aug 2019 12:52:32 +0000 (12:52 +0000)
commit59d5abaa71b524fb983b8945e3703eb55c0cf6cb
tree8cd6421b97a6f5fddc242de3e53dbe03e2270174
parentf13370280057c51cc98ed4a3f44fcb72e76944a3
[DWARF] Fix reading 64-bit DWARF type units.

The type_offset field is 8 bytes long in DWARF64. The patch extends
TypeOffset to uint64_t and fixes its reading. The patch also fixes
checking of TypeOffset bounds as it was inaccurate in DWARF64 case.

Differential Revision: https://reviews.llvm.org/D66465

llvm-svn: 369378
llvm/include/llvm/DebugInfo/DWARF/DWARFTypeUnit.h
llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h
llvm/lib/DebugInfo/DWARF/DWARFTypeUnit.cpp
llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
llvm/test/tools/llvm-dwarfdump/X86/typeunit-v4-dwarf64.s [new file with mode: 0644]
llvm/test/tools/llvm-dwarfdump/X86/typeunit-v5-dwarf64.s [new file with mode: 0644]