Added partial specialization of FoldingSetTrait for pointers.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52989 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Ted Kremenek 2008-07-01 22:30:13 +00:00
parent 1096734011
commit e1bf7fdcb4

View File

@ -426,6 +426,18 @@ public:
operator T&() { return data; }
operator const T&() const { return data; }
};
//===----------------------------------------------------------------------===//
// Partial specializations of FoldingSetTrait.
template<typename T> struct FoldingSetTrait<T*> {
static inline void Profile(const T* X, FoldingSetNodeID& ID) {
ID.AddPointer(X);
}
static inline void Profile(T* X, FoldingSetNodeID& ID) {
ID.AddPointer(X);
}
};
} // End of namespace llvm.