Bitcode: Correctly handle Fixed and VBR arrays in BitstreamCursor::skipRecord().
authorPeter Collingbourne <peter@pcc.me.uk>
Thu, 1 Dec 2016 05:47:58 +0000 (05:47 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Thu, 1 Dec 2016 05:47:58 +0000 (05:47 +0000)
commitcf2750a501da4bc44d89a606c6be4fe23f0b115d
treedadda1ae18fe89d8fd973823ba279c217d704603
parent2eed75926c411e14cfe4d5d4a612da092034e927
Bitcode: Correctly handle Fixed and VBR arrays in BitstreamCursor::skipRecord().

The assertions were wrong; we need to call getEncodingData() on the element,
not the array. While here, simplify the skipRecord() implementation for Fixed
and Char6 arrays. This is tested by the code I added to llvm-bcanalyzer
which makes sure that we can skip any record.

Differential Revision: https://reviews.llvm.org/D27241

llvm-svn: 288315
llvm/lib/Bitcode/Reader/BitstreamReader.cpp
llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp