projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
40ed1d8
)
Add specialization of FoldingSetTrait for std::pair.
author
Manuel Klimek
<klimek@google.com>
Sun, 15 Jun 2014 14:42:25 +0000
(14:42 +0000)
committer
Manuel Klimek
<klimek@google.com>
Sun, 15 Jun 2014 14:42:25 +0000
(14:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210990
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/ADT/FoldingSet.h
patch
|
blob
|
history
diff --git
a/include/llvm/ADT/FoldingSet.h
b/include/llvm/ADT/FoldingSet.h
index 9b7ee8520d7f2aadba0a1c649baa194f5aef710d..14c5933d388ac1b276ea6ea81f499bceb4c98302 100644
(file)
--- 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