forked from OSchip/llvm-project
[ORC] Use inline friend definitions for SymbolStringPtr operators.
llvm-svn: 360917
This commit is contained in:
parent
3fdd4b74a6
commit
d18f58166c
|
@ -50,9 +50,6 @@ private:
|
|||
class SymbolStringPtr {
|
||||
friend class SymbolStringPool;
|
||||
friend struct DenseMapInfo<SymbolStringPtr>;
|
||||
friend bool operator==(const SymbolStringPtr &LHS,
|
||||
const SymbolStringPtr &RHS);
|
||||
friend bool operator<(const SymbolStringPtr &LHS, const SymbolStringPtr &RHS);
|
||||
|
||||
static SymbolStringPool::PoolMapEntry Tombstone;
|
||||
|
||||
|
@ -92,6 +89,21 @@ public:
|
|||
|
||||
StringRef operator*() const { return S->first(); }
|
||||
|
||||
friend bool operator==(const SymbolStringPtr &LHS,
|
||||
const SymbolStringPtr &RHS) {
|
||||
return LHS.S == RHS.S;
|
||||
}
|
||||
|
||||
friend bool operator!=(const SymbolStringPtr &LHS,
|
||||
const SymbolStringPtr &RHS) {
|
||||
return !(LHS == RHS);
|
||||
}
|
||||
|
||||
friend bool operator<(const SymbolStringPtr &LHS,
|
||||
const SymbolStringPtr &RHS) {
|
||||
return LHS.S < RHS.S;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
SymbolStringPtr(SymbolStringPool::PoolMapEntry *S)
|
||||
|
@ -103,18 +115,6 @@ private:
|
|||
SymbolStringPool::PoolMapEntry *S = nullptr;
|
||||
};
|
||||
|
||||
inline bool operator==(const SymbolStringPtr &LHS, const SymbolStringPtr &RHS) {
|
||||
return LHS.S == RHS.S;
|
||||
}
|
||||
|
||||
inline bool operator!=(const SymbolStringPtr &LHS, const SymbolStringPtr &RHS) {
|
||||
return !(LHS == RHS);
|
||||
}
|
||||
|
||||
inline bool operator<(const SymbolStringPtr &LHS, const SymbolStringPtr &RHS) {
|
||||
return LHS.S < RHS.S;
|
||||
}
|
||||
|
||||
inline SymbolStringPool::~SymbolStringPool() {
|
||||
#ifndef NDEBUG
|
||||
clearDeadEntries();
|
||||
|
|
Loading…
Reference in New Issue