[llvm-commits] CVS: llvm/lib/Bytecode/Reader/Reader.cpp
LLVM
llvm at cs.uiuc.edu
Fri Jul 9 16:15:01 PDT 2004
Changes in directory llvm/lib/Bytecode/Reader:
Reader.cpp updated: 1.110 -> 1.111
---
Log message:
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.
---
Diffs of the changes: (+5 -0)
Index: llvm/lib/Bytecode/Reader/Reader.cpp
diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.110 llvm/lib/Bytecode/Reader/Reader.cpp:1.111
--- llvm/lib/Bytecode/Reader/Reader.cpp:1.110 Sun Jul 4 19:57:50 2004
+++ llvm/lib/Bytecode/Reader/Reader.cpp Fri Jul 9 16:13:53 2004
@@ -1641,6 +1641,11 @@
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);
}
More information about the llvm-commits
mailing list