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 | c2f4b115527e6ab40585fe8bf2d0fd3191b168a6 (patch) | |
tree | 6f4b1c64ce8ce4f07b2947f18926cf5ebca85c90 /lib/Bytecode/Reader/ConstantReader.cpp | |
parent | ebfb9f487df8920bd734c258fac6cc0538baaafa (diff) |
In the future, these slabs can be null...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10083 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode/Reader/ConstantReader.cpp')
-rw-r--r-- | lib/Bytecode/Reader/ConstantReader.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Bytecode/Reader/ConstantReader.cpp b/lib/Bytecode/Reader/ConstantReader.cpp index 7d8859b9f8..a8386645db 100644 --- a/lib/Bytecode/Reader/ConstantReader.cpp +++ b/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); } |