Add partial specialization of FoldingSetTrait for ImmutableList.
authorZhongxing Xu <xuzhongxing@gmail.com>
Sun, 16 Nov 2008 04:23:49 +0000 (04:23 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Sun, 16 Nov 2008 04:23:49 +0000 (04:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59387 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/ImmutableList.h

index de6af7d5eb2594bf0107077d9437caad9d9b042e..9dde0dbbbf65025ea6d2ebc036414a0fbcdd0a24 100644 (file)
@@ -194,6 +194,11 @@ public:
 //===----------------------------------------------------------------------===//
 // 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> > {