diff options
| author | Ted Kremenek <kremenek@apple.com> | 2008-07-01 22:30:13 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2008-07-01 22:30:13 +0000 |
| commit | 65a3b39f8131a4710f34ea34b8fbc148a38c08d6 (patch) | |
| tree | 289abb64b5ff8f323f236f96182e4df52401956e /include | |
| parent | 152ad1398164aad60fa4e1a97b760d6a80a7bb8e (diff) | |
| download | external_llvm-65a3b39f8131a4710f34ea34b8fbc148a38c08d6.zip external_llvm-65a3b39f8131a4710f34ea34b8fbc148a38c08d6.tar.gz external_llvm-65a3b39f8131a4710f34ea34b8fbc148a38c08d6.tar.bz2 | |
Added partial specialization of FoldingSetTrait for pointers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52989 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
| -rw-r--r-- | include/llvm/ADT/FoldingSet.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/ADT/FoldingSet.h b/include/llvm/ADT/FoldingSet.h index c6696b3..5f541ae 100644 --- a/include/llvm/ADT/FoldingSet.h +++ b/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. |
