From 6afea253e078357f7c306fa2b13151bbe24ae049 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Sun, 27 Sep 2009 15:32:21 +0000 Subject: [PATCH] Micro-optimize DerivedType::dropAllTypeUses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82900 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/Type.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp index da53800ad7e..820789d89e7 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; } }