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