Bitcode: derive all types used from records instead of Values.
authorTim Northover <tnorthover@apple.com>
Thu, 27 Jun 2019 14:46:51 +0000 (14:46 +0000)
committerTim Northover <tnorthover@apple.com>
Thu, 27 Jun 2019 14:46:51 +0000 (14:46 +0000)
commita4771e9dfdb0485c2edb416bfdc479d49de0aa14
tree593c4778c4519836f3be78302003a01d9944afa0
parent7a9ca67fd556a1352f7ea98ada7941d05d59ed07
Bitcode: derive all types used from records instead of Values.

There is existing bitcode that we need to support where the structured nature
of pointer types is used to derive the result type of some operation. For
example a GEP's operation and result will be based on its input Type.

When pointers become opaque, the BitcodeReader will still have access to this
information because it's explicitly told how to construct the more complex
types used, but this information will not be attached to any Value that gets
looked up. This changes BitcodeReader so that in all places which use type
information in this manner, it's derived from a side-table rather than from the
Value in question.

llvm-svn: 364550
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/lib/Bitcode/Reader/ValueList.cpp
llvm/lib/Bitcode/Reader/ValueList.h
llvm/test/Bitcode/invalid.test