From c899b33b830c360e53eb35440a1371542925414f Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Mon, 21 Jan 2008 22:49:22 +0000 Subject: [PATCH] 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 --- include/llvm/ADT/FoldingSet.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/llvm/ADT/FoldingSet.h b/include/llvm/ADT/FoldingSet.h index e626b6e62ee..112d86c5f64 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; -- 2.11.0