diff options
author | Gordon Henriksen <gordonhenriksen@mac.com> | 2007-12-10 03:35:18 +0000 |
---|---|---|
committer | Gordon Henriksen <gordonhenriksen@mac.com> | 2007-12-10 03:35:18 +0000 |
commit | 53c34b1db978f1820677f410c6f3f59046ffa4c0 (patch) | |
tree | b45c84342ac6c5b1337343a16f7b4f2d4615d901 /include/llvm/Support/StringPool.h | |
parent | e754abea467fed5bbc4f53c4e0a989bb4df7240f (diff) |
Delete the CollectorNamePool if it should become empty.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44775 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/StringPool.h')
-rw-r--r-- | include/llvm/Support/StringPool.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/Support/StringPool.h b/include/llvm/Support/StringPool.h index 7ac2b147c3..46087e4d1f 100644 --- a/include/llvm/Support/StringPool.h +++ b/include/llvm/Support/StringPool.h @@ -70,6 +70,10 @@ namespace llvm { /// reference-counted pointer to it. No additional memory is allocated if /// the string already exists in the pool. inline PooledStringPtr intern(const char *Str); + + /// empty - Checks whether the pool is empty. Returns true if so. + /// + inline bool empty() const { return InternTable.empty(); } }; /// PooledStringPtr - A pointer to an interned string. Use operator bool to |