aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/ADT/PriorityQueue.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/ADT/PriorityQueue.h b/include/llvm/ADT/PriorityQueue.h
index 2503f75e81..f10bb6c7af 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