aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-03-09 04:56:22 +0000
committerChris Lattner <sabre@nondot.org>2009-03-09 04:56:22 +0000
commitbce6091d95b7fd56d7c6760b0de54fb6c4300539 (patch)
tree220de7a8181f20d939d25dbb9a638ba1c022a1d0
parenta9a9e07d1c5d3c73835e716d81c2ec94ad0b865f (diff)
downloadexternal_llvm-bce6091d95b7fd56d7c6760b0de54fb6c4300539.zip
external_llvm-bce6091d95b7fd56d7c6760b0de54fb6c4300539.tar.gz
external_llvm-bce6091d95b7fd56d7c6760b0de54fb6c4300539.tar.bz2
fix Analysis/BasicAA/2004-12-08-BasicAACrash.ll by allowing opaque types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66395 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/VMCore/Instructions.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp
index 90af9f1..7f5d461 100644
--- a/lib/VMCore/Instructions.cpp
+++ b/lib/VMCore/Instructions.cpp
@@ -1058,8 +1058,10 @@ static const Type* getIndexedTypeInternal(const Type *Ptr, IndexTy const *Idxs,
return Agg;
// If there is at least one index, the top level type must be sized, otherwise
- // it cannot be 'stepped over'.
- if (!Agg->isSized())
+ // it cannot be 'stepped over'. We explicitly allow abstract types (those
+ // that contain opaque types) under the assumption that it will be resolved to
+ // a sane type later.
+ if (!Agg->isSized() && !Agg->isAbstract())
return 0;
unsigned CurIdx = 1;