summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-05-16 00:16:32 +0000
committerDan Gohman <gohman@apple.com>2008-05-16 00:16:32 +0000
commit2f156ae850da4fb00db1c5d1cac3e7ed1ea43a91 (patch)
tree548efeceb9adb99b3b9207afe88892c569fe29ae /llvm/lib
parent32db11b634e7e881f1d2e905de6d6e562fd83ac2 (diff)
downloadbcm5719-llvm-2f156ae850da4fb00db1c5d1cac3e7ed1ea43a91.tar.gz
bcm5719-llvm-2f156ae850da4fb00db1c5d1cac3e7ed1ea43a91.zip
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. llvm-svn: 51171
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/VMCore/Instructions.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/Instructions.cpp b/llvm/lib/VMCore/Instructions.cpp
index c54815aaacf..9fc70ce59b1 100644
--- a/llvm/lib/VMCore/Instructions.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud