From: Ted Kremenek Date: Mon, 21 Jan 2008 22:49:22 +0000 (+0000) Subject: Added "clear" method to FoldingSetNodeID to allow a FoldingSetNodeID object X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c899b33b830c360e53eb35440a1371542925414f;p=oota-llvm.git 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 --- 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;