[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructure.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Nov 6 23:00:02 PST 2002
Changes in directory llvm/lib/Analysis/DataStructure:
DataStructure.cpp updated: 1.45 -> 1.46
---
Log message:
Minor bugfix to enable generation of methcall.llvm.lib, objinst.llvm.lib, and
The problem was merging two unsized types like function's, ie int (int*) with
int (uint *)
---
Diffs of the changes:
Index: llvm/lib/Analysis/DataStructure/DataStructure.cpp
diff -u llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.45 llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.46
--- llvm/lib/Analysis/DataStructure/DataStructure.cpp:1.45 Wed Nov 6 19:54:56 2002
+++ llvm/lib/Analysis/DataStructure/DataStructure.cpp Wed Nov 6 22:59:28 2002
@@ -187,7 +187,7 @@
return mergeTypeInfo(OldTy, 0);
}
- assert(Offset < Size &&
+ assert(Offset <= Size &&
"Cannot merge something into a part of our type that doesn't exist!");
// Find the section of Ty.Ty that NewTy overlaps with... first we find the
@@ -234,7 +234,7 @@
// structure, the type desired may actually be the first element of the
// composite type...
//
- unsigned SubTypeSize = TD.getTypeSize(SubType);
+ unsigned SubTypeSize = SubType->isSized() ? TD.getTypeSize(SubType) : 0;
while (SubType != NewTy) {
const Type *NextSubType = 0;
unsigned NextSubTypeSize;
More information about the llvm-commits
mailing list