[llvm-commits] CVS: llvm/lib/Bytecode/Reader/ConstantReader.cpp

Chris Lattner lattner at cs.uiuc.edu
Wed Nov 19 11:21:00 PST 2003


Changes in directory llvm/lib/Bytecode/Reader:

ConstantReader.cpp updated: 1.64 -> 1.65

---
Log message:

In the future, these slabs can be null...


---
Diffs of the changes:  (+2 -1)

Index: llvm/lib/Bytecode/Reader/ConstantReader.cpp
diff -u llvm/lib/Bytecode/Reader/ConstantReader.cpp:1.64 llvm/lib/Bytecode/Reader/ConstantReader.cpp:1.65
--- llvm/lib/Bytecode/Reader/ConstantReader.cpp:1.64	Wed Nov 19 11:17:36 2003
+++ llvm/lib/Bytecode/Reader/ConstantReader.cpp	Wed Nov 19 11:20:42 2003
@@ -326,7 +326,8 @@
         // 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);
       }





More information about the llvm-commits mailing list