[llvm-commits] [llvm] r52656 - /llvm/trunk/include/llvm/ADT/PriorityQueue.h

Dan Gohman gohman at apple.com
Mon Jun 23 16:47:46 PDT 2008


Author: djg
Date: Mon Jun 23 18:47:46 2008
New Revision: 52656

URL: http://llvm.org/viewvc/llvm-project?rev=52656&view=rev
Log:
Add a clear() method to PriorityQueue.

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

Modified: llvm/trunk/include/llvm/ADT/PriorityQueue.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/PriorityQueue.h?rev=52656&r1=52655&r2=52656&view=diff

==============================================================================
--- llvm/trunk/include/llvm/ADT/PriorityQueue.h (original)
+++ llvm/trunk/include/llvm/ADT/PriorityQueue.h Mon Jun 23 18:47:46 2008
@@ -70,6 +70,12 @@
   void reheapify() {
     std::make_heap(this->c.begin(), this->c.end(), this->comp);
   }
+
+  /// clear - Erase all elements from the queue.
+  ///
+  void clear() {
+    this->c.clear();
+  }
 };
 
 } // End llvm namespace





More information about the llvm-commits mailing list