Author: kremenek
Date: Mon Jan 21 16:49:22 2008
New Revision: 46226

URL: http://llvm.org/viewvc/llvm-project?rev=46226&view=rev
Log:
Added "clear" method to FoldingSetNodeID to allow a FoldingSetNodeID object
to be reused to compute multiple object profiles.

Modified:
    llvm/trunk/include/llvm/ADT/FoldingSet.h

Modified: llvm/trunk/include/llvm/ADT/FoldingSet.h
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/FoldingSet.h?rev=46226&r1=46225&r2=46226&view=diff

==============================================================================
--- llvm/trunk/include/llvm/ADT/FoldingSet.h (original)
+++ llvm/trunk/include/llvm/ADT/FoldingSet.h Mon Jan 21 16:49:22 2008
@@ -208,6 +208,10 @@
   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;


_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to