[llvm-commits] [llvm] r59387 - /llvm/trunk/include/llvm/ADT/ImmutableList.h
Zhongxing Xu
xuzhongxing at gmail.com
Sat Nov 15 20:23:50 PST 2008
Author: zhongxingxu
Date: Sat Nov 15 22:23:49 2008
New Revision: 59387
URL: http://llvm.org/viewvc/llvm-project?rev=59387&view=rev
Log:
Add partial specialization of FoldingSetTrait for ImmutableList.
Modified:
llvm/trunk/include/llvm/ADT/ImmutableList.h
Modified: llvm/trunk/include/llvm/ADT/ImmutableList.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ImmutableList.h?rev=59387&r1=59386&r2=59387&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/ImmutableList.h (original)
+++ llvm/trunk/include/llvm/ADT/ImmutableList.h Sat Nov 15 22:23:49 2008
@@ -194,6 +194,11 @@
//===----------------------------------------------------------------------===//
// Partially-specialized Traits.
//===----------------------------------------------------------------------===//
+template<typename T> struct FoldingSetTrait<const T*> {
+ static inline void Profile(const T* X, FoldingSetNodeID& ID) {
+ ID.AddPointer(X);
+ }
+};
template<typename T> struct DenseMapInfo;
template<typename T> struct DenseMapInfo<ImmutableList<T> > {
More information about the llvm-commits
mailing list