summaryrefslogtreecommitdiff
path: root/include/llvm/ADT/PriorityQueue.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-06-23 23:47:46 +0000
committerDan Gohman <gohman@apple.com>2008-06-23 23:47:46 +0000
commitcaf746aa5a836bc3401049235c6d7d41c5921502 (patch)
tree71cd4307c4d22d40431623a22d5b5d4e6add55ef /include/llvm/ADT/PriorityQueue.h
parentebcba612b537f45a033ccd9a60bee0c45e2e2ded (diff)
downloadllvm-caf746aa5a836bc3401049235c6d7d41c5921502.tar.gz
llvm-caf746aa5a836bc3401049235c6d7d41c5921502.tar.bz2
llvm-caf746aa5a836bc3401049235c6d7d41c5921502.tar.xz
Add a clear() method to PriorityQueue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52656 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/PriorityQueue.h')
-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