]> granicus.if.org Git - llvm/commit
Bitcode: Decouple block info block state from reader.
authorPeter Collingbourne <peter@pcc.me.uk>
Tue, 8 Nov 2016 04:17:11 +0000 (04:17 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Tue, 8 Nov 2016 04:17:11 +0000 (04:17 +0000)
commit8fc9b4d314c49fa3e20f1f91d09d6160502a8e1e
treef038f307c00821a5de4cb9e9f406930823f122b4
parentef0facce3e2f2af8795a3cfba188dd87fe357f3c
Bitcode: Decouple block info block state from reader.

As proposed on llvm-dev:
http://lists.llvm.org/pipermail/llvm-dev/2016-October/106630.html

Move block info block state to a new class, BitstreamBlockInfo.
Clients may set the block info for a particular cursor with the
BitstreamCursor::setBlockInfo() method.

At this point BitstreamReader is not much more than a container for an
ArrayRef<uint8_t>, so remove it and replace all uses with direct uses
of memory buffers.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286207 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Bitcode/BitstreamReader.h
lib/Bitcode/Reader/BitcodeReader.cpp
lib/Bitcode/Reader/BitstreamReader.cpp
tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
unittests/Bitcode/BitstreamReaderTest.cpp