[DebugInfo][InstrRef] Don't fire assertions if debug-info is faulty
authorJeremy Morse <jeremy.morse@sony.com>
Thu, 10 Feb 2022 11:07:15 +0000 (11:07 +0000)
committerJeremy Morse <jeremy.morse@sony.com>
Thu, 10 Feb 2022 11:25:08 +0000 (11:25 +0000)
commitbe5734ddaae3521f8ccf3dbf4e747f51aa448936
tree42d7af9ab53e5c9e84d86cbae3f5dd7feb16c075
parent8fa45b826a68037904e2c4b7a9e2de7c4a798bd3
[DebugInfo][InstrRef] Don't fire assertions if debug-info is faulty

It's inevitable that optimisation passes will fail to update debug-info:
when that happens, it's best if the compiler doesn't crash as a result.
Therefore, downgrade a few assertions / failure modes that would crash
when illegal debug-info was seen, to instead drop variable locations. In
practice this means that an instruction reference to a nonexistant or
illegal operand should be tolerated.

Differential Revision: https://reviews.llvm.org/D118998
llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp
llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.h
llvm/test/DebugInfo/MIR/InstrRef/livedebugvalues_illegal_locs.mir [new file with mode: 0644]