aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-11-07 04:59:28 +0000
committerChris Lattner <sabre@nondot.org>2002-11-07 04:59:28 +0000
commitf17b39ab2a4f05427a2834fb177635ba10ee1186 (patch)
treeac54fc38d1ad0c6c034750e080b0c5ac551ece74 /lib/Analysis
parentbc87ae7360706c2f5d4bd9a43492d9f8973ed341 (diff)
downloadexternal_llvm-f17b39ab2a4f05427a2834fb177635ba10ee1186.zip
external_llvm-f17b39ab2a4f05427a2834fb177635ba10ee1186.tar.gz
external_llvm-f17b39ab2a4f05427a2834fb177635ba10ee1186.tar.bz2
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 *) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4594 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/DataStructure/DataStructure.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp
index cb56db1..18192a1 100644
--- a/lib/Analysis/DataStructure/DataStructure.cpp
+++ b/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;