[DebugInfo] printCompactDWARFExpr: don't assert on stack size
authorScott Linder <Scott.Linder@amd.com>
Wed, 8 Feb 2023 20:01:42 +0000 (20:01 +0000)
committerScott Linder <Scott.Linder@amd.com>
Wed, 19 Apr 2023 20:46:18 +0000 (20:46 +0000)
commit7f596bb50944ee41a9dd1cb95c196dc6f8873b21
treeaf179ac741480ed25af8c2fbaaff65c37c2aed44
parenta4fb7f60e26c21596d74336e894b0bb1d2b4f15e
[DebugInfo] printCompactDWARFExpr: don't assert on stack size

Gracefully handle non-1 stack sizes in printCompactDWARFExpr rather than
assert. Add support for DW_OP_nop and test the zero-sized stack case.

This is intended to be nearly NFC.

Differential Revision: https://reviews.llvm.org/D147269
llvm/lib/DebugInfo/DWARF/DWARFExpression.cpp
llvm/unittests/DebugInfo/DWARF/DWARFExpressionCompactPrinterTest.cpp