diff options
author | Chris Lattner <sabre@nondot.org> | 2002-11-07 04:59:28 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-11-07 04:59:28 +0000 |
commit | f9d29b32998337eabec2f6471e3be68b4626bc25 (patch) | |
tree | f124e7ea35172a1caa693282e6fc56648a3f898f /llvm/lib/Analysis/DataStructure/DataStructure.cpp | |
parent | 88ff2a457cecd5b26e2f55a49cd3489df9ec76f4 (diff) | |
download | bcm5719-llvm-f9d29b32998337eabec2f6471e3be68b4626bc25.tar.gz bcm5719-llvm-f9d29b32998337eabec2f6471e3be68b4626bc25.zip |
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 *)
llvm-svn: 4594
Diffstat (limited to 'llvm/lib/Analysis/DataStructure/DataStructure.cpp')
-rw-r--r-- | llvm/lib/Analysis/DataStructure/DataStructure.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/DataStructure/DataStructure.cpp b/llvm/lib/Analysis/DataStructure/DataStructure.cpp index cb56db1f9f0..18192a1c4ad 100644 --- a/llvm/lib/Analysis/DataStructure/DataStructure.cpp +++ b/llvm/lib/Analysis/DataStructure/DataStructure.cpp @@ -187,7 +187,7 @@ bool DSNode::mergeTypeInfo(const Type *NewTy, unsigned Offset) { 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 @@ bool DSNode::mergeTypeInfo(const Type *NewTy, unsigned Offset) { // 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; |