diff options
author | Chris Lattner <sabre@nondot.org> | 2004-04-05 01:27:26 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-04-05 01:27:26 +0000 |
commit | 15701e84d138210e24c5c074837b87911be65009 (patch) | |
tree | 2419979e9c6e32dc47ed5472bb76acd6533e7bcb /llvm/lib/Bytecode/Reader/Reader.cpp | |
parent | 60cf133a8e963f235736fc64110f4784e55e1b0c (diff) | |
download | bcm5719-llvm-15701e84d138210e24c5c074837b87911be65009.tar.gz bcm5719-llvm-15701e84d138210e24c5c074837b87911be65009.zip |
Implement support for a new LLVM 1.3 bytecode format, which uses uint's
to index into structure types and allows arbitrary 32- and 64-bit integer
types to index into sequential types.
llvm-svn: 12651
Diffstat (limited to 'llvm/lib/Bytecode/Reader/Reader.cpp')
-rw-r--r-- | llvm/lib/Bytecode/Reader/Reader.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/llvm/lib/Bytecode/Reader/Reader.cpp b/llvm/lib/Bytecode/Reader/Reader.cpp index 54c91811a9b..2f0879ba394 100644 --- a/llvm/lib/Bytecode/Reader/Reader.cpp +++ b/llvm/lib/Bytecode/Reader/Reader.cpp @@ -647,12 +647,10 @@ void BytecodeParser::ParseVersionInfo(const unsigned char *&Buf, // Default values for the current bytecode version hasInconsistentModuleGlobalInfo = false; hasExplicitPrimitiveZeros = false; + hasRestrictedGEPTypes = false; switch (RevisionNum) { case 0: // LLVM 1.0, 1.1 release version - // Compared to rev #2, we added support for weak linkage, a more dense - // encoding, and better varargs support. - // Base LLVM 1.0 bytecode format. hasInconsistentModuleGlobalInfo = true; hasExplicitPrimitiveZeros = true; @@ -663,6 +661,13 @@ void BytecodeParser::ParseVersionInfo(const unsigned char *&Buf, // Also, it fixed the problem where the size of the ModuleGlobalInfo block // included the size for the alignment at the end, where the rest of the // blocks did not. + + // LLVM 1.2 and before required that GEP indices be ubyte constants for + // structures and longs for sequential types. + hasRestrictedGEPTypes = true; + + // FALL THROUGH + case 2: // LLVM 1.3 release version break; default: |