diff options
author | Dan Gohman <gohman@apple.com> | 2009-09-27 15:32:21 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-09-27 15:32:21 +0000 |
commit | 6afea253e078357f7c306fa2b13151bbe24ae049 (patch) | |
tree | 919dfe1d1dfacb3131098fa6dbfc36c808eeceb7 | |
parent | 00cb67359fc2515eb972cd41fa35f8a0d2b22b87 (diff) |
Micro-optimize DerivedType::dropAllTypeUses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82900 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/VMCore/Type.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp index da53800ad7..820789d89e 100644 --- a/lib/VMCore/Type.cpp +++ b/lib/VMCore/Type.cpp @@ -498,8 +498,9 @@ void DerivedType::dropAllTypeUses() { // pick so long as it doesn't point back to this type. We choose something // concrete to avoid overhead for adding to AbstractTypeUser lists and // stuff. + const Type *ConcreteTy = Type::getInt32Ty(getContext()); for (unsigned i = 1, e = NumContainedTys; i != e; ++i) - ContainedTys[i] = Type::getInt32Ty(getContext()); + ContainedTys[i] = ConcreteTy; } } |