Bitcode: Fix reading and writing of ConstantDataVectors of halfs
authorJustin Bogner <mail@justinbogner.com>
Wed, 6 Jan 2016 22:31:32 +0000 (22:31 +0000)
committerJustin Bogner <mail@justinbogner.com>
Wed, 6 Jan 2016 22:31:32 +0000 (22:31 +0000)
commit4b0bd158058240d73a4848891746e0d5954bbeb3
tree4b811e4006e5d1e0098a6744eae658b79490e0b6
parentbd0b681bbd0977986ee9b76d203db4e3be7a27ec
Bitcode: Fix reading and writing of ConstantDataVectors of halfs

In r254991 I allowed ConstantDataVectors to contain elements of
HalfTy, but I missed updating the bitcode reader and writer to handle
this, so now we crash if we try to emit bitcode on programs that have
constant vectors of half.

This fixes the issue and adds test coverage for reading and writing
constant sequences in bitcode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256982 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Bitcode/Reader/BitcodeReader.cpp
lib/Bitcode/Writer/BitcodeWriter.cpp
test/Bitcode/constant-sequence.ll [new file with mode: 0644]