Teach llvm-bcanalyzer to use one stream's BLOCKINFO to read another stream.
authorJordan Rose <jordan_rose@apple.com>
Sat, 30 Aug 2014 17:07:55 +0000 (17:07 +0000)
committerJordan Rose <jordan_rose@apple.com>
Sat, 30 Aug 2014 17:07:55 +0000 (17:07 +0000)
commitd421075d0c2af980382960f3a91289edaf5397ca
tree27b5115a08f0227d524a0a042ab6c9ea0e229c31
parent3af13568fbd7dc26d9274a19838c52c6875248bc
Teach llvm-bcanalyzer to use one stream's BLOCKINFO to read another stream.

This allows streams that only use BLOCKINFO for debugging purposes to omit
the block entirely. As long as another stream is available with the correct
BLOCKINFO, the first stream can still be analyzed and dumped.

As part of this commit, BitstreamReader gets a move constructor and move
assignment operator, as well as a takeBlockInfo method.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216826 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Bitcode/BitstreamReader.h
test/Bitcode/function-encoding-rel-operands.ll
test/Other/Inputs/block-info-only.bc [new file with mode: 0755]
test/Other/Inputs/has-block-info.bc [new file with mode: 0644]
test/Other/Inputs/no-block-info.bc [new file with mode: 0755]
test/Other/bcanalyzer-block-info.txt [new file with mode: 0644]
tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp