Lines Matching defs:PooledStringPtr
27 class PooledStringPtr;
31 friend class PooledStringPtr;
38 PooledStringPtr intern(std::string S);
55 class PooledStringPtr {
57 friend struct std::hash<PooledStringPtr>;
60 PooledStringPtr() = default;
61 PooledStringPtr(std::nullptr_t) {}
62 PooledStringPtr(const PooledStringPtr &Other) : S(Other.S) {
67 PooledStringPtr &operator=(const PooledStringPtr &Other) {
69 assert(S->second && "Releasing PooledStringPtr with zero ref count");
78 PooledStringPtr(PooledStringPtr &&Other) : S(nullptr) {
82 PooledStringPtr &operator=(PooledStringPtr &&Other) {
84 assert(S->second && "Releasing PooledStringPtr with zero ref count");
92 ~PooledStringPtr() {
94 assert(S->second && "Releasing PooledStringPtr with zero ref count");
103 friend bool operator==(const PooledStringPtr &LHS,
104 const PooledStringPtr &RHS) {
108 friend bool operator!=(const PooledStringPtr &LHS,
109 const PooledStringPtr &RHS) {
113 friend bool operator<(const PooledStringPtr &LHS,
114 const PooledStringPtr &RHS) {
122 PooledStringPtr(StringPool::PoolMapEntry *S) : S(S) {
137 inline PooledStringPtr StringPool::intern(std::string S) {
142 return PooledStringPtr(&*I);
164 template <> struct hash<orc_rt::PooledStringPtr> {
165 size_t operator()(const orc_rt::PooledStringPtr &A) const {
166 return hash<orc_rt::PooledStringPtr::PoolEntryPtr>()(A.S);