Calling InvalidateEntry during the refinement was breaking the bootstrap.

llvm-svn: 90656
This commit is contained in:
Bill Wendling 2009-12-05 07:59:04 +00:00
parent fa3f115ec4
commit 29d6390249
1 changed files with 12 additions and 2 deletions

View File

@ -327,7 +327,12 @@ class StructLayoutMap : public AbstractTypeUser {
///
virtual void refineAbstractType(const DerivedType *OldTy,
const Type *) {
InvalidateEntry(cast<const StructType>(OldTy));
const StructType *STy = cast<const StructType>(OldTy);
LayoutInfoTy::iterator Iter = LayoutInfo.find(STy);
Iter->second->~StructLayout();
free(Iter->second);
LayoutInfo.erase(Iter);
OldTy->removeAbstractTypeUser(this);
}
/// typeBecameConcrete - The other case which AbstractTypeUsers must be aware
@ -336,7 +341,12 @@ class StructLayoutMap : public AbstractTypeUser {
/// This method notifies ATU's when this occurs for a type.
///
virtual void typeBecameConcrete(const DerivedType *AbsTy) {
InvalidateEntry(cast<const StructType>(AbsTy));
const StructType *STy = cast<const StructType>(AbsTy);
LayoutInfoTy::iterator Iter = LayoutInfo.find(STy);
Iter->second->~StructLayout();
free(Iter->second);
LayoutInfo.erase(Iter);
AbsTy->removeAbstractTypeUser(this);
}
public: