[DWARFDebugLine] Use truncating data extractors for prologue parsing
authorPavel Labath <pavel@labath.sk>
Thu, 2 Apr 2020 13:32:59 +0000 (15:32 +0200)
committerPavel Labath <pavel@labath.sk>
Wed, 10 Jun 2020 14:12:53 +0000 (16:12 +0200)
commit6f55b5a101d95b1049643f87a6572b36d6b4b44c
tree8407f67b770f1996868314ad986fcf71f605be82
parent4e3a44d42eace1924c9cba3b7c1ea9cdbbd6cb48
[DWARFDebugLine] Use truncating data extractors for prologue parsing

Summary:
This makes the code easier to reason about, as it will behave the same
way regardless of whether there is any more data coming after the
presumed end of the prologue.

Reviewers: jhenderson, dblaikie, probinson, ikudrin

Subscribers: hiraditya, MaskRay, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77557
llvm/include/llvm/DebugInfo/DWARF/DWARFDebugLine.h
llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
llvm/test/tools/llvm-dwarfdump/X86/Inputs/debug_line_malformed.s
llvm/test/tools/llvm-dwarfdump/X86/debug_line_invalid.test
llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp