[codeview] Truncate records to maximum record size near 64KB
authorReid Kleckner <rnk@google.com>
Wed, 5 Oct 2016 22:36:07 +0000 (22:36 +0000)
committerReid Kleckner <rnk@google.com>
Wed, 5 Oct 2016 22:36:07 +0000 (22:36 +0000)
commitbb96df602ebf7357b24cba5bf4fb09750d467be7
tree971fe03560ba0c08423831a8db5a913f81365a47
parent5aa02480594f861efc332650188eef6b2986a269
[codeview] Truncate records to maximum record size near 64KB

If we don't truncate, LLVM asserts when the label difference doesn't fit
in a 16 bit field. This patch truncates two kinds of data: trailing null
terminated names in symbol records, and inline line tables. The inline
line table test that I have is too large (many MB), so I'm not checking
it in.

Hopefully fixes PR28264.

llvm-svn: 283403
llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
llvm/lib/MC/MCCodeView.cpp
llvm/test/DebugInfo/COFF/long-name.ll [new file with mode: 0644]