diff options
author | Dan Gohman <gohman@apple.com> | 2008-05-16 00:16:32 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-05-16 00:16:32 +0000 |
commit | 561a42fafe7f3bad16ed4f8f6b223394b4dc3529 (patch) | |
tree | a7901b76d7f8d1549cc9559a68130f56081443bb /lib/VMCore | |
parent | 0e135bfde3d48350ff74400eeeb9d12f33d1dba8 (diff) | |
download | external_llvm-561a42fafe7f3bad16ed4f8f6b223394b4dc3529.zip external_llvm-561a42fafe7f3bad16ed4f8f6b223394b4dc3529.tar.gz external_llvm-561a42fafe7f3bad16ed4f8f6b223394b4dc3529.tar.bz2 |
Revert the change from r51157 in
test/Verifier/2002-11-05-GetelementptrPointers.ll, which was incorrect.
Instead, fix getIndexedType to not follow pointer types, as
PointerType is a subclass of CompositeType.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51171 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/Instructions.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp index c54815a..9fc70ce 100644 --- a/lib/VMCore/Instructions.cpp +++ b/lib/VMCore/Instructions.cpp @@ -1336,7 +1336,7 @@ const Type* ExtractValueInst::getIndexedType(const Type *Agg, unsigned CurIdx = 0; for (; CurIdx != NumIdx; ++CurIdx) { const CompositeType *CT = dyn_cast<CompositeType>(Agg); - if (!CT) return 0; + if (!CT || isa<PointerType>(CT)) return 0; Value *Index = Idxs[CurIdx]; if (!CT->indexValid(Index)) return 0; Agg = CT->getTypeAtIndex(Index); |