[llvm-commits] CVS: llvm/lib/Transforms/ExprTypeConvert.cpp TransformInternals.cpp
John Criswell
criswell at choi.cs.uiuc.edu
Thu Jun 26 16:42:40 PDT 2003
Changes in directory llvm/lib/Transforms:
ExprTypeConvert.cpp updated: 1.73 -> 1.73.2.1
TransformInternals.cpp updated: 1.35 -> 1.35.2.1
---
Log message:
Merged with mainline on Thursday, June 26, 2003.
---
Diffs of the changes:
Index: llvm/lib/Transforms/ExprTypeConvert.cpp
diff -u llvm/lib/Transforms/ExprTypeConvert.cpp:1.73 llvm/lib/Transforms/ExprTypeConvert.cpp:1.73.2.1
--- llvm/lib/Transforms/ExprTypeConvert.cpp:1.73 Thu May 29 10:12:27 2003
+++ llvm/lib/Transforms/ExprTypeConvert.cpp Thu Jun 26 16:35:25 2003
@@ -49,6 +49,7 @@
// Get information about the base datatype being allocated, before & after
int ReqTypeSize = TD.getTypeSize(Ty);
+ if (ReqTypeSize == 0) return false;
unsigned OldTypeSize = TD.getTypeSize(MI->getType()->getElementType());
// Must have a scale or offset to analyze it...
Index: llvm/lib/Transforms/TransformInternals.cpp
diff -u llvm/lib/Transforms/TransformInternals.cpp:1.35 llvm/lib/Transforms/TransformInternals.cpp:1.35.2.1
--- llvm/lib/Transforms/TransformInternals.cpp:1.35 Sat Jun 7 16:45:42 2003
+++ llvm/lib/Transforms/TransformInternals.cpp Thu Jun 26 16:35:25 2003
@@ -119,6 +119,7 @@
if (!ElTy->isSized() || (isa<PointerType>(CompTy) && !Indices.empty()))
return 0; // Type is unreasonable... escape!
unsigned ElSize = TD.getTypeSize(ElTy);
+ if (ElSize == 0) return 0; // Avoid division by zero...
int64_t ElSizeS = ElSize;
// See if the user is indexing into a different cell of this array...
More information about the llvm-commits
mailing list