[dsymutil] Add a new automatic verification mode
authorJonas Devlieghere <jonas@devlieghere.com>
Fri, 31 Mar 2023 16:45:06 +0000 (09:45 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Fri, 31 Mar 2023 16:59:46 +0000 (09:59 -0700)
commitbe91b4e3f4f9b13b16f8482d9bfd9734898e52e1
treef653e1e030c1e58402f4a100d960a267f03760dd
parent758bca6483853a743297b68bd88a5dba9d5247f2
[dsymutil] Add a new automatic verification mode

This patch a new verification mode called "auto" that runs the DWARF
verifier on the input and if the input is valid, also runs the DWARF
verifier on the output. The goal is to catch cases where dsymutil turns
valid DWARF into invalid DWARF. This patch makes this verification mode
the default when assertions or expensive checks are enabled.

Differential revision: https://reviews.llvm.org/D147203
llvm/include/llvm/DWARFLinker/DWARFLinker.h
llvm/lib/DWARFLinker/DWARFLinker.cpp
llvm/tools/dsymutil/DwarfLinkerForBinary.cpp
llvm/tools/dsymutil/DwarfLinkerForBinary.h
llvm/tools/dsymutil/Options.td
llvm/tools/dsymutil/dsymutil.cpp
llvm/tools/dsymutil/dsymutil.h