mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +00: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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14728 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
20d20fc77d
commit
011bed5ef8
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user