diff options
| author | Chris Lattner <sabre@nondot.org> | 2003-11-19 17:20:42 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2003-11-19 17:20:42 +0000 |
| commit | bf346b526f8ec77419c30b1e0d0b1a264934c919 (patch) | |
| tree | c0db3987b859f0a6a6c28dab7cdab93d68697c38 /llvm/lib/Bytecode | |
| parent | 11e8f1b595a77ead0d3648bac7ea875348e425a6 (diff) | |
| download | bcm5719-llvm-bf346b526f8ec77419c30b1e0d0b1a264934c919.tar.gz bcm5719-llvm-bf346b526f8ec77419c30b1e0d0b1a264934c919.zip | |
In the future, these slabs can be null...
llvm-svn: 10083
Diffstat (limited to 'llvm/lib/Bytecode')
| -rw-r--r-- | llvm/lib/Bytecode/Reader/ConstantReader.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Bytecode/Reader/ConstantReader.cpp b/llvm/lib/Bytecode/Reader/ConstantReader.cpp index 7d8859b9f8e..a8386645dba 100644 --- a/llvm/lib/Bytecode/Reader/ConstantReader.cpp +++ b/llvm/lib/Bytecode/Reader/ConstantReader.cpp @@ -326,7 +326,8 @@ void BytecodeParser::ParseConstantPool(const unsigned char *&Buf, // If we are reading a function constant table, make sure that we adjust // the slot number to be the real global constant number. // - if (&Tab != &ModuleValues && Typ < ModuleValues.size()) + if (&Tab != &ModuleValues && Typ < ModuleValues.size() && + ModuleValues[Typ]) Slot += ModuleValues[Typ]->size(); ResolveReferencesToConstant(C, Slot); } |

