[llvm-commits] CVS: llvm/include/llvm/ADT/FoldingSet.h

Jim Laskey jlaskey at apple.com
Thu Nov 2 06:21:43 PST 2006



Changes in directory llvm/include/llvm/ADT:

FoldingSet.h updated: 1.3 -> 1.4
---
Log message:

Allow FoldingSet clients to pump up the initial hash size.

---
Diffs of the changes:  (+5 -1)

 FoldingSet.h |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/ADT/FoldingSet.h
diff -u llvm/include/llvm/ADT/FoldingSet.h:1.3 llvm/include/llvm/ADT/FoldingSet.h:1.4
--- llvm/include/llvm/ADT/FoldingSet.h:1.3	Fri Oct 27 17:52:02 2006
+++ llvm/include/llvm/ADT/FoldingSet.h	Thu Nov  2 08:21:26 2006
@@ -117,7 +117,7 @@
   unsigned NumNodes;
   
 public:
-  FoldingSetImpl();
+  FoldingSetImpl(unsigned Log2InitSize = 6);
   virtual ~FoldingSetImpl();
   
   // Forward declaration.
@@ -229,6 +229,10 @@
   }
   
 public:
+  FoldingSet(unsigned Log2InitSize = 6)
+  : FoldingSetImpl(Log2InitSize)
+  {}
+
   /// GetOrInsertNode - If there is an existing simple Node exactly
   /// equal to the specified node, return it.  Otherwise, insert 'N' and
   /// return it instead.






More information about the llvm-commits mailing list