Don't call getForwardedType() twice, as recommended by Chris.

llvm-svn: 13391
This commit is contained in:
John Criswell 2004-05-06 22:15:47 +00:00
parent 6aee736d1b
commit 2af0fd3ca8
1 changed files with 2 additions and 2 deletions

View File

@ -161,8 +161,8 @@ const Type* GetElementPtrInst::getIndexedType(const Type *Ptr,
// of being refined to another type (and hence, may have dropped all
// references to what it was using before). So, use the new forwarded
// type.
if (Ptr->getForwardedType()) {
Ptr = Ptr->getForwardedType();
if (const Type * Ty = Ptr->getForwardedType()) {
Ptr = Ty;
}
}
return CurIdx == Idx.size() ? Ptr : 0;