diff options
author | Chris Lattner <sabre@nondot.org> | 2011-04-25 20:58:50 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-04-25 20:58:50 +0000 |
commit | e27c3ea2bcdabf1b8be87675c66a38c3ad0ac1f9 (patch) | |
tree | a021feee80ef1ac2d49661ea69ee838a4da985f3 /lib | |
parent | ed0318eab83cac5250353d8b70bca684ce247d70 (diff) | |
download | external_llvm-e27c3ea2bcdabf1b8be87675c66a38c3ad0ac1f9.zip external_llvm-e27c3ea2bcdabf1b8be87675c66a38c3ad0ac1f9.tar.gz external_llvm-e27c3ea2bcdabf1b8be87675c66a38c3ad0ac1f9.tar.bz2 |
allow adding a FoldingSetNodeID to a FastFoldingSetNode, resolving PR9499,
patch by Johannes Schaub!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130151 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Support/FoldingSet.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Support/FoldingSet.cpp b/lib/Support/FoldingSet.cpp index a4f80a9..d2e35b8 100644 --- a/lib/Support/FoldingSet.cpp +++ b/lib/Support/FoldingSet.cpp @@ -147,6 +147,11 @@ void FoldingSetNodeID::AddString(StringRef String) { Bits.push_back(V); } +// AddNodeID - Adds the Bit data of another ID to *this. +void FoldingSetNodeID::AddNodeID(const FoldingSetNodeID &ID) { + Bits.append(ID.Bits.begin(), ID.Bits.end()); +} + /// ComputeHash - Compute a strong hash value for this FoldingSetNodeID, used to /// lookup the node in the FoldingSetImpl. unsigned FoldingSetNodeID::ComputeHash() const { |