aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-09-04 23:41:03 +0000
committerChris Lattner <sabre@nondot.org>2003-09-04 23:41:03 +0000
commita3057e8c89c358442474eb73901b232bebfda9eb (patch)
tree485f136f5f0f0faaac7db7d2687f777f1cb962dd
parentc34c13245aaee69efe3db85c51bcb53f6a30be1c (diff)
downloadexternal_llvm-a3057e8c89c358442474eb73901b232bebfda9eb.zip
external_llvm-a3057e8c89c358442474eb73901b232bebfda9eb.tar.gz
external_llvm-a3057e8c89c358442474eb73901b232bebfda9eb.tar.bz2
Don't try to be sneaky, breaking recursive types in the process
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8348 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/VMCore/Type.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp
index d52986d..6b9334d 100644
--- a/lib/VMCore/Type.cpp
+++ b/lib/VMCore/Type.cpp
@@ -211,10 +211,7 @@ static std::string getTypeDescription(const Type *Ty,
// In order to reduce the amount of repeated computation, we cache the
// computed value for later.
- if (Ty->isAbstract())
- return AbstractTypeDescriptions[Ty] = Result;
- else
- return ConcreteTypeDescriptions[Ty] = Result;
+ return Result;
}
@@ -225,9 +222,7 @@ static const std::string &getOrCreateDesc(std::map<const Type*,std::string>&Map,
if (I != Map.end()) return I->second;
std::vector<const Type *> TypeStack;
- getTypeDescription(Ty, TypeStack);
- assert(Map.count(Ty) && "Type didn't get inserted!!");
- return Map[Ty];
+ return Map[Ty] = getTypeDescription(Ty, TypeStack);
}