diff options
author | Manuel Klimek <klimek@google.com> | 2014-06-15 14:42:25 +0000 |
---|---|---|
committer | Manuel Klimek <klimek@google.com> | 2014-06-15 14:42:25 +0000 |
commit | cc3f31aec5d3532e55df5c1392344b73067ed526 (patch) | |
tree | 96975b2ffd52920c75192914654aac6c3b8c7988 | |
parent | 40ed1d89b19856777b2072ab8a0ae89d54b2e440 (diff) | |
download | llvm-cc3f31aec5d3532e55df5c1392344b73067ed526.tar.gz llvm-cc3f31aec5d3532e55df5c1392344b73067ed526.tar.bz2 llvm-cc3f31aec5d3532e55df5c1392344b73067ed526.tar.xz |
Add specialization of FoldingSetTrait for std::pair.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210990 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/ADT/FoldingSet.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/ADT/FoldingSet.h b/include/llvm/ADT/FoldingSet.h index 9b7ee8520d..14c5933d38 100644 --- a/include/llvm/ADT/FoldingSet.h +++ b/include/llvm/ADT/FoldingSet.h @@ -794,6 +794,14 @@ template<typename T> struct FoldingSetTrait<T*> { ID.AddPointer(X); } }; +template <typename T1, typename T2> +struct FoldingSetTrait<std::pair<T1, T2>> { + static inline void Profile(const std::pair<T1, T2> &P, + llvm::FoldingSetNodeID &ID) { + ID.Add(P.first); + ID.Add(P.second); + } +}; } // End of namespace llvm. #endif |