1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

Fix a backwards compatibility bug found by Tanya. In version 1.2, the

global type plane starts with a length and the TypeTyID value to identify
the type plane has having type definitions. This doesn't happen in 1.3
because the types are read from a known position in the file. However, the
TypeTyID must be read in (and ignored) if its a 1.2 bytecode file.

llvm-svn: 14728
This commit is contained in:
Reid Spencer 2004-07-09 21:13:53 +00:00
parent a46346890c
commit d38042c423

View File

@ -1641,6 +1641,11 @@ void BytecodeReader::ParseAllFunctionBodies() {
void BytecodeReader::ParseGlobalTypes() {
// Read the number of types
unsigned NumEntries = read_vbr_uint();
// Ignore the type plane identifier for types if the bc file is pre 1.3
if (hasTypeDerivedFromValue)
read_vbr_uint();
ParseTypeConstants(ModuleTypes, NumEntries);
}