[DebugInfo] Separate error generation from reporting in DWARFHeaderUnit::extract...
commit814a79aea67ba50c1b0d9cce01393b6d4e063e3c
authorAlex Langford <alangford@apple.com>
Wed, 18 Oct 2023 16:06:39 +0000 (18 09:06 -0700)
committerGitHub <noreply@github.com>
Wed, 18 Oct 2023 16:06:39 +0000 (18 09:06 -0700)
treebed738a91623a263ad16873e1f52a6f6f51cd034
parentc80b50349648dcf7fcbf4ae69c62b3d34bee0c70
[DebugInfo] Separate error generation from reporting in DWARFHeaderUnit::extract (#68242)

Instead of reporting the error directly through the DWARFContext passed
in as an argument, it would be more flexible to have extract return the
error and allow the caller to react appropriately.

This will be useful for using llvm's DWARFHeaderUnit from lldb which may
report header extraction errors through a different mechanism.
llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h
llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
llvm/test/tools/llvm-dwp/X86/cu_tu_units_manual_v5_invalid.s [new file with mode: 0644]
llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp