[opaque pointer type] bitcode support for explicit type parameter to the load instruction
authorDavid Blaikie <dblaikie@gmail.com>
Wed, 25 Feb 2015 01:07:20 +0000 (01:07 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Wed, 25 Feb 2015 01:07:20 +0000 (01:07 +0000)
commit5e2e6f28554c323018ad1ad6de952b38369fe42d
treed0de104b0d2709bbb7d5042d03c0b81cd9c83e05
parentf8d179ba76285e728702e15552b3b857471e4e92
[opaque pointer type] bitcode support for explicit type parameter to the load instruction

Summary:
I've taken my best guess at this, but I've cargo culted in places & so
explanations/corrections would be great.

This seems to pass all the tests (check-all, covering clang and llvm) so I
believe that pretty well exercises both the backwards compatibility and common
(same version) compatibility given the number of checked in bitcode files we
already have. Is that a reasonable approach to testing here? Would some more
explicit tests be desired?

1) is this the right way to do back-compat in this case (looking at the number
  of entries in the bitcode record to disambiguate between the old schema and
  the new?)

2) I don't quite understand the logarithm logic to choose the encoding type of
  the type parameter in the abbreviation description, but I found another
  instruction doing the same thing & it seems to work. Is that the right
  approach?

Reviewers: dexonsmith

Differential Revision: http://reviews.llvm.org/D7655

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230414 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Bitcode/Reader/BitcodeReader.cpp
lib/Bitcode/Writer/BitcodeWriter.cpp