[DebugInfo] Do not error on unsupported CIE version
authorRafael Auler <rafaelauler@fb.com>
Tue, 9 Mar 2021 03:21:16 +0000 (19:21 -0800)
committerRafael Auler <rafaelauler@fb.com>
Tue, 9 Mar 2021 03:39:08 +0000 (19:39 -0800)
commit7a3e664db5761e27a3cf7d67580f43470f927624
treeb6adcaaf9a96c19e0d3a0128dd7bbf44e245ed0b
parent5cdb2e98608bf57c216ee7067e8a12d070c9e2bd
[DebugInfo] Do not error on unsupported CIE version

D81469 introduced a check to error on CIE version different
than 1 for eh_frame, but older compilers mistakenly create binaries
with this version set to 3 for DWARF4 or 4 to DWARF5. Move the check
to dump time instead of eh_frame parse time, so we can be tolerant
with older binaries.

Reviewed By: aprantl

Differential Revision: https://reviews.llvm.org/D97830
llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp
llvm/test/DebugInfo/X86/eh-frame-invalid-version-zero.s
llvm/test/DebugInfo/X86/eh-frame-invalid-version.s