Skip to content

Commit

Permalink
Add specialization of FoldingSetTrait for std::pair.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210990 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
r4nt committed Jun 15, 2014
1 parent 40ed1d8 commit cc3f31a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/llvm/ADT/FoldingSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit cc3f31a

Please sign in to comment.