OSDN Git Service

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)
commit1ade9071319309ef1cdde0ab9364f245ceb0b05a
treeccdac7c4b4cc0849fb187d15b0513723265aca9f
parent7418f3f6fa63546f56f34d61aa068af3925dacac
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364550 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Bitcode/Reader/BitcodeReader.cpp
lib/Bitcode/Reader/ValueList.cpp
lib/Bitcode/Reader/ValueList.h
test/Bitcode/invalid.test