Allow FoldingSet clients to pump up the initial hash size.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31377 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Laskey
2006-11-02 14:21:26 +00:00
parent 41562398b6
commit 1f67a99260
2 changed files with 9 additions and 3 deletions

View File

@@ -117,7 +117,7 @@ private:
unsigned NumNodes;
public:
FoldingSetImpl();
FoldingSetImpl(unsigned Log2InitSize = 6);
virtual ~FoldingSetImpl();
// Forward declaration.
@@ -229,6 +229,10 @@ private:
}
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.