move partial template specialization to FoldingSet.h.
authorZhongxing Xu <xuzhongxing@gmail.com>
Mon, 17 Nov 2008 02:40:00 +0000 (02:40 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Mon, 17 Nov 2008 02:40:00 +0000 (02:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59434 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/FoldingSet.h
include/llvm/ADT/ImmutableList.h

index 16c811852a8d4f56709318966b7771cfc51d25a0..4c93711394e4ce900ec3a8c51866fa8fac172e25 100644 (file)
@@ -449,6 +449,12 @@ template<typename T> struct FoldingSetTrait<T*> {
   }
 };
 
+template<typename T> struct FoldingSetTrait<const T*> {
+  static inline void Profile(const T* X, FoldingSetNodeID& ID) {
+    ID.AddPointer(X);
+  }
+};
+
 } // End of namespace llvm.
 
 
index 9dde0dbbbf65025ea6d2ebc036414a0fbcdd0a24..de6af7d5eb2594bf0107077d9437caad9d9b042e 100644 (file)
@@ -194,11 +194,6 @@ 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> > {