aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-01-21 22:49:22 +0000
committerTed Kremenek <kremenek@apple.com>2008-01-21 22:49:22 +0000
commitbe35f8af8f6f193a46627c8702d480425ac06203 (patch)
tree0d4ed4d8337f65068fc5de6d8f1bd308abf88233 /include
parentcb814f6ad8575e2f8b0c2bba632867ff78bd9346 (diff)
downloadexternal_llvm-be35f8af8f6f193a46627c8702d480425ac06203.zip
external_llvm-be35f8af8f6f193a46627c8702d480425ac06203.tar.gz
external_llvm-be35f8af8f6f193a46627c8702d480425ac06203.tar.bz2
Added "clear" method to FoldingSetNodeID to allow a FoldingSetNodeID object
to be reused to compute multiple object profiles. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46226 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/ADT/FoldingSet.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/ADT/FoldingSet.h b/include/llvm/ADT/FoldingSet.h
index e626b6e..112d86c 100644
--- a/include/llvm/ADT/FoldingSet.h
+++ b/include/llvm/ADT/FoldingSet.h
@@ -208,6 +208,10 @@ public:
void AddAPFloat(const APFloat& apf);
void AddString(const std::string &String);
+ /// clear - Clear the accumulated profile, allowing this FoldingSetNodeID
+ /// object to be used to compute a new profile.
+ inline void clear() { Bits.clear(); }
+
/// ComputeHash - Compute a strong hash value for this FoldingSetNodeID, used
/// to lookup the node in the FoldingSetImpl.
unsigned ComputeHash() const;