aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/ADT/FoldingSet.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-08-22 16:14:23 +0000
committerDan Gohman <gohman@apple.com>2008-08-22 16:14:23 +0000
commit932e8564fc659b039ef9ead03f8af54bb0ca0c88 (patch)
tree2bb2925baa8b4de4d9b4d58708f9481b6f28974a /include/llvm/ADT/FoldingSet.h
parente458ea810c21132ec659af98842d5dae560bf8b8 (diff)
downloadexternal_llvm-932e8564fc659b039ef9ead03f8af54bb0ca0c88.zip
external_llvm-932e8564fc659b039ef9ead03f8af54bb0ca0c88.tar.gz
external_llvm-932e8564fc659b039ef9ead03f8af54bb0ca0c88.tar.bz2
Add an empty() member to FoldingSet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55182 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/FoldingSet.h')
-rw-r--r--include/llvm/ADT/FoldingSet.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/ADT/FoldingSet.h b/include/llvm/ADT/FoldingSet.h
index f34a62d..2871272 100644
--- a/include/llvm/ADT/FoldingSet.h
+++ b/include/llvm/ADT/FoldingSet.h
@@ -164,6 +164,9 @@ public:
/// size - Returns the number of nodes in the folding set.
unsigned size() const { return NumNodes; }
+
+ /// empty - Returns true if there are no nodes in the folding set.
+ bool empty() const { return NumNodes == 0; }
private: