diff --git a/include/llvm/ADT/PriorityQueue.h b/include/llvm/ADT/PriorityQueue.h index 2503f75e81a..f10bb6c7afa 100644 --- a/include/llvm/ADT/PriorityQueue.h +++ b/include/llvm/ADT/PriorityQueue.h @@ -70,6 +70,12 @@ public: 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