Add specialization of FoldingSetTrait for std::pair.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210990 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Manuel Klimek 2014-06-15 14:42:25 +00:00
parent 40ed1d89b1
commit cc3f31aec5

View File

@ -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