Incorporating review feedback from Reid.
authorGordon Henriksen <gordonhenriksen@mac.com>
Sat, 8 Dec 2007 20:10:40 +0000 (20:10 +0000)
committerGordon Henriksen <gordonhenriksen@mac.com>
Sat, 8 Dec 2007 20:10:40 +0000 (20:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44713 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/StringPool.h

index 07b2a8ddde2afd262a117fed63c599eb2a4b3e69..692befffe996f7848cba554ceff1ba59dbb5093b 100644 (file)
@@ -41,6 +41,8 @@ namespace llvm {
   /// string. Strings are removed automatically as PooledStringPtrs are
   /// destroyed.
   class StringPool {
   /// string. Strings are removed automatically as PooledStringPtrs are
   /// destroyed.
   class StringPool {
+    /// PooledString - This is the value of an entry in the pool's interning
+    /// table.
     struct PooledString {
       StringPool *Pool;  ///< So the string can remove itself.
       unsigned Refcount; ///< Number of referencing PooledStringPtrs.
     struct PooledString {
       StringPool *Pool;  ///< So the string can remove itself.
       unsigned Refcount; ///< Number of referencing PooledStringPtrs.
@@ -59,7 +61,14 @@ namespace llvm {
     StringPool();
     ~StringPool();
     
     StringPool();
     ~StringPool();
     
+    /// intern - Adds a string to the pool and returns a reference-counted
+    /// pointer to it. No additional memory is allocated if the string already
+    /// exists in the pool.
     PooledStringPtr intern(const char *Begin, const char *End);
     PooledStringPtr intern(const char *Begin, const char *End);
+    
+    /// intern - Adds a null-terminated string to the pool and returns a
+    /// reference-counted pointer to it. No additional memory is allocated if
+    /// the string already exists in the pool.
     inline PooledStringPtr intern(const char *Str);
   };
   
     inline PooledStringPtr intern(const char *Str);
   };