[llvm-commits] [llvm] r59387 - /llvm/trunk/include/llvm/ADT/ImmutableList.h

Ted Kremenek kremenek at apple.com
Sun Nov 16 11:44:44 PST 2008


This partial specialization should go in FoldingSet.h since it is  
generic and is not specifically related to ImmutableList.

On Nov 15, 2008, at 8:23 PM, Zhongxing Xu <xuzhongxing at gmail.com> wrote:

> Author: zhongxingxu
> Date: Sat Nov 15 22:23:49 2008
> New Revision: 59387
>
> URL: http://llvm.org/viewvc/llvm-project?rev=59387&view=rev
> Log:
> Add partial specialization of FoldingSetTrait for ImmutableList.
>
> Modified:
>    llvm/trunk/include/llvm/ADT/ImmutableList.h
>
> Modified: llvm/trunk/include/llvm/ADT/ImmutableList.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ImmutableList.h?rev=59387&r1=59386&r2=59387&view=diff
>
> === 
> === 
> === 
> =====================================================================
> --- llvm/trunk/include/llvm/ADT/ImmutableList.h (original)
> +++ llvm/trunk/include/llvm/ADT/ImmutableList.h Sat Nov 15 22:23:49  
> 2008
> @@ -194,6 +194,11 @@
> // 
> === 
> --- 
> ------------------------------------------------------------------- 
> ===//
> // Partially-specialized Traits.
> // 
> === 
> --- 
> ------------------------------------------------------------------- 
> ===//
> +template<typename T> struct FoldingSetTrait<const T*> {
> +  static inline void Profile(const T* X, FoldingSetNodeID& ID) {
> +    ID.AddPointer(X);
> +  }
> +};
>
> template<typename T> struct DenseMapInfo;
> template<typename T> struct DenseMapInfo<ImmutableList<T> > {
>
>
> _______________________________________________
> 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