fix a bug in the 1 index GEP handling code

llvm-svn: 21670
This commit is contained in:
Chris Lattner 2005-05-03 16:44:45 +00:00
parent 38cabd7265
commit c22333348e
1 changed files with 1 additions and 1 deletions

View File

@ -728,7 +728,7 @@ const Type* GetElementPtrInst::getIndexedType(const Type *Ptr, Value *Idx) {
// Check the pointer index.
if (!PTy->indexValid(Idx)) return 0;
return PTy;
return PTy->getElementType();
}
//===----------------------------------------------------------------------===//