diff options
-rw-r--r-- | llvm/include/llvm/ADT/FoldingSet.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/include/llvm/ADT/FoldingSet.h b/llvm/include/llvm/ADT/FoldingSet.h index c6696b30344..5f541aeaa4f 100644 --- a/llvm/include/llvm/ADT/FoldingSet.h +++ b/llvm/include/llvm/ADT/FoldingSet.h @@ -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. |