StringPool.h (208954) | StringPool.h (210299) |
---|---|
1//===-- StringPool.h - Interned string pool ---------------------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 50 unchanged lines hidden (view full) --- 59 60 public: 61 StringPool(); 62 ~StringPool(); 63 64 /// intern - Adds a string to the pool and returns a reference-counted 65 /// pointer to it. No additional memory is allocated if the string already 66 /// exists in the pool. | 1//===-- StringPool.h - Interned string pool ---------------------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// --- 50 unchanged lines hidden (view full) --- 59 60 public: 61 StringPool(); 62 ~StringPool(); 63 64 /// intern - Adds a string to the pool and returns a reference-counted 65 /// pointer to it. No additional memory is allocated if the string already 66 /// exists in the pool. |
67 PooledStringPtr intern(const StringRef &Str); | 67 PooledStringPtr intern(StringRef Str); |
68 69 /// empty - Checks whether the pool is empty. Returns true if so. 70 /// 71 inline bool empty() const { return InternTable.empty(); } 72 }; 73 74 /// PooledStringPtr - A pointer to an interned string. Use operator bool to 75 /// test whether the pointer is valid, and operator * to get the string if so. --- 64 unchanged lines hidden --- | 68 69 /// empty - Checks whether the pool is empty. Returns true if so. 70 /// 71 inline bool empty() const { return InternTable.empty(); } 72 }; 73 74 /// PooledStringPtr - A pointer to an interned string. Use operator bool to 75 /// test whether the pointer is valid, and operator * to get the string if so. --- 64 unchanged lines hidden --- |