Don't try to be sneaky, breaking recursive types in the process

llvm-svn: 8348
This commit is contained in:
Chris Lattner 2003-09-04 23:41:03 +00:00
parent 50745187ef
commit b8b10b5c54
1 changed files with 2 additions and 7 deletions

View File

@ -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);
}