[llvm-commits] [llvm] r90656 - /llvm/trunk/lib/Target/TargetData.cpp

Bill Wendling isanbard at gmail.com
Fri Dec 4 23:59:04 PST 2009


Author: void
Date: Sat Dec  5 01:59:04 2009
New Revision: 90656

URL: http://llvm.org/viewvc/llvm-project?rev=90656&view=rev
Log:
Calling InvalidateEntry during the refinement was breaking the bootstrap.

Modified:
    llvm/trunk/lib/Target/TargetData.cpp

Modified: llvm/trunk/lib/Target/TargetData.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetData.cpp?rev=90656&r1=90655&r2=90656&view=diff

==============================================================================
--- llvm/trunk/lib/Target/TargetData.cpp (original)
+++ llvm/trunk/lib/Target/TargetData.cpp Sat Dec  5 01:59:04 2009
@@ -327,7 +327,12 @@
   ///
   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 @@
   /// 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:





More information about the llvm-commits mailing list