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

Chris Lattner clattner at apple.com
Thu Dec 17 11:52:17 PST 2009


On Dec 4, 2009, at 11:59 PM, Bill Wendling wrote:

> 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.

How?  They do the same thing?

-Chris

> 
> 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:
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits





More information about the llvm-commits mailing list