]> granicus.if.org Git - llvm/commit
DWARF: Fix a regression in location list dumping
authorPavel Labath <pavel@labath.sk>
Wed, 4 Sep 2019 10:09:12 +0000 (10:09 +0000)
committerPavel Labath <pavel@labath.sk>
Wed, 4 Sep 2019 10:09:12 +0000 (10:09 +0000)
commit7c8f17874e3c1b9734b71cd955baf684632bf512
treef9056e76ea3114125ca7e83e5ed59da526ece5aa
parent95f6d02cc9a0d2a0a72df111da714509fafa8ce7
DWARF: Fix a regression in location list dumping

Summary:
While fixing the handling of some error cases, r370363 introduced new
problems -- assertion failures due to unchecked errors (my excuse is that a very
early version of that patch used Optional<T> instead of Expected).

This patch adds proper handling of parsing errors encountered when
dumping location lists from inside DWARF DIEs, and adds a bunch of
additional tests.

I reorder the arguments of the location list dumping functions to make
them consistent, and also be able to dump the two kinds of location
lists generically.

Reviewers: JDevlieghere, dblaikie, probinson

Subscribers: aprantl, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370868 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h
lib/DebugInfo/DWARF/DWARFDebugLoc.cpp
lib/DebugInfo/DWARF/DWARFDie.cpp
test/DebugInfo/X86/dwarfdump-debug-loc-error-cases2.s [new file with mode: 0644]
test/DebugInfo/X86/dwarfdump-debug-loclists-error-cases2.s [new file with mode: 0644]