diff options
author | John Criswell <criswell@uiuc.edu> | 2004-05-06 22:15:47 +0000 |
---|---|---|
committer | John Criswell <criswell@uiuc.edu> | 2004-05-06 22:15:47 +0000 |
commit | 8cb23dad208e074faa38bd3a8cb341f9ab972c33 (patch) | |
tree | b0ae2228e5b91441487858732bf24354006aec2e /lib | |
parent | 60083e2fc0f1165b7511757449f1ee3852b7229c (diff) | |
download | external_llvm-8cb23dad208e074faa38bd3a8cb341f9ab972c33.zip external_llvm-8cb23dad208e074faa38bd3a8cb341f9ab972c33.tar.gz external_llvm-8cb23dad208e074faa38bd3a8cb341f9ab972c33.tar.bz2 |
Don't call getForwardedType() twice, as recommended by Chris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13391 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/VMCore/iMemory.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/VMCore/iMemory.cpp b/lib/VMCore/iMemory.cpp index 32fe71a..da4cc74 100644 --- a/lib/VMCore/iMemory.cpp +++ b/lib/VMCore/iMemory.cpp @@ -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; |