[llvm-commits] CVS: llvm/lib/Transforms/TransformInternals.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Jan 22 20:40:01 PST 2003
Changes in directory llvm/lib/Transforms:
TransformInternals.cpp updated: 1.31 -> 1.32
---
Log message:
Fix bug: LevelRaise/2003-01-22-GEPProblem.ll
---
Diffs of the changes:
Index: llvm/lib/Transforms/TransformInternals.cpp
diff -u llvm/lib/Transforms/TransformInternals.cpp:1.31 llvm/lib/Transforms/TransformInternals.cpp:1.32
--- llvm/lib/Transforms/TransformInternals.cpp:1.31 Wed Oct 2 13:53:14 2002
+++ llvm/lib/Transforms/TransformInternals.cpp Wed Jan 22 20:39:10 2003
@@ -120,7 +120,7 @@
Offset -= ActualOffset;
} else {
const Type *ElTy = cast<SequentialType>(CompTy)->getElementType();
- if (!ElTy->isSized())
+ if (!ElTy->isSized() || (isa<PointerType>(CompTy) && !Indices.empty()))
return 0; // Type is unreasonable... escape!
unsigned ElSize = TD.getTypeSize(ElTy);
int64_t ElSizeS = ElSize;
More information about the llvm-commits
mailing list