From: Bill Wendling Date: Sat, 5 Dec 2009 07:59:04 +0000 (+0000) Subject: Calling InvalidateEntry during the refinement was breaking the bootstrap. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=740266269b2df0b44a5a11cb5204d97d2dd3d0a3;p=oota-llvm.git Calling InvalidateEntry during the refinement was breaking the bootstrap. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90656 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp index 2a5b572a115..9434a1901ff 100644 --- a/lib/Target/TargetData.cpp +++ b/lib/Target/TargetData.cpp @@ -327,7 +327,12 @@ class StructLayoutMap : public AbstractTypeUser { /// virtual void refineAbstractType(const DerivedType *OldTy, const Type *) { - InvalidateEntry(cast(OldTy)); + const StructType *STy = cast(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(AbsTy)); + const StructType *STy = cast(AbsTy); + LayoutInfoTy::iterator Iter = LayoutInfo.find(STy); + Iter->second->~StructLayout(); + free(Iter->second); + LayoutInfo.erase(Iter); + AbsTy->removeAbstractTypeUser(this); } public: