29 #ifndef LLVM_SUPPORT_STRINGPOOL_H 30 #define LLVM_SUPPORT_STRINGPOOL_H 38 class PooledStringPtr;
48 unsigned Refcount = 0;
51 PooledString() =
default;
71 inline bool empty()
const {
return InternTable.
empty(); }
107 if (--S->
getValue().Refcount == 0) {
108 S->
getValue().Pool->InternTable.remove(S);
117 assert(*
this &&
"Attempt to dereference empty PooledStringPtr!");
121 inline const char *
end()
const {
122 assert(*
this &&
"Attempt to dereference empty PooledStringPtr!");
127 assert(*
this &&
"Attempt to dereference empty PooledStringPtr!");
132 inline explicit operator bool()
const {
return S !=
nullptr; }
140 #endif // LLVM_SUPPORT_STRINGPOOL_H friend class PooledStringPtr
PooledStringPtr intern(StringRef Str)
intern - Adds a string to the pool and returns a reference-counted pointer to it. ...
const_iterator begin(StringRef path, Style style=Style::native)
Get begin iterator over path.
Compute iterated dominance frontiers using a linear time algorithm.
StringMapEntry - This is used to represent one value that is inserted into a StringMap.
StringPool - An interned string pool.
PooledStringPtr(const PooledStringPtr &That)
const ValueTy & getValue() const
bool operator==(const PooledStringPtr &That) const
void Destroy(AllocatorTy &Allocator)
Destroy - Destroy this StringMapEntry, releasing memory back to the specified allocator.
const char * operator*() const
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
bool empty() const
empty - Checks whether the pool is empty.
bool operator!=(const PooledStringPtr &That) const
static void clear(coro::Shape &Shape)
const char * begin() const
size_t getKeyLength() const
PooledStringPtr & operator=(const PooledStringPtr &That)
const char * getKeyData() const
getKeyData - Return the start of the string data that is the key for this value.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
PooledStringPtr - A pointer to an interned string.
StringRef - Represent a constant reference to a string, i.e.
PooledStringPtr(entry_t *E)