[llvm-commits] CVS: llvm/lib/Bytecode/Writer/SlotCalculator.cpp

Chris Lattner lattner at cs.uiuc.edu
Sat Oct 23 21:28:13 PDT 2004



Changes in directory llvm/lib/Bytecode/Writer:

SlotCalculator.cpp updated: 1.64 -> 1.65
---
Log message:

Fix the previous bug the correct way.  This fixes ptrdist/bc


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

Index: llvm/lib/Bytecode/Writer/SlotCalculator.cpp
diff -u llvm/lib/Bytecode/Writer/SlotCalculator.cpp:1.64 llvm/lib/Bytecode/Writer/SlotCalculator.cpp:1.65
--- llvm/lib/Bytecode/Writer/SlotCalculator.cpp:1.64	Fri Oct 22 22:10:23 2004
+++ llvm/lib/Bytecode/Writer/SlotCalculator.cpp	Sat Oct 23 23:27:59 2004
@@ -151,8 +151,8 @@
         unsigned FirstNonStringID = 0;
         for (unsigned i = 0, e = Plane.size(); i != e; ++i)
           if (isa<ConstantAggregateZero>(Plane[i]) || 
-	      isa<UndefValue>(Plane[i]) ||
-              cast<ConstantArray>(Plane[i])->isString()) {
+	      (isa<ConstantArray>(Plane[i]) &&
+               cast<ConstantArray>(Plane[i])->isString())) {
             // Check to see if we have to shuffle this string around.  If not,
             // don't do anything.
             if (i != FirstNonStringID) {






More information about the llvm-commits mailing list