mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
Added FoldingSet profiling support to ImmutableSet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46757 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1011,12 +1011,25 @@ public:
|
|||||||
iterator begin() const { return iterator(Root); }
|
iterator begin() const { return iterator(Root); }
|
||||||
iterator end() const { return iterator(); }
|
iterator end() const { return iterator(); }
|
||||||
|
|
||||||
|
//===--------------------------------------------------===//
|
||||||
|
// Utility methods.
|
||||||
|
//===--------------------------------------------------===//
|
||||||
|
|
||||||
|
inline unsigned getHeight() const { return Root ? Root->getHeight() : 0; }
|
||||||
|
|
||||||
|
static inline void Profile(FoldingSetNodeID& ID, const ImmutableSet& S) {
|
||||||
|
ID.AddPointer(S.Root);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void Profile(FoldingSetNodeID& ID) const {
|
||||||
|
return Profile(ID,*this);
|
||||||
|
}
|
||||||
|
|
||||||
//===--------------------------------------------------===//
|
//===--------------------------------------------------===//
|
||||||
// For testing.
|
// For testing.
|
||||||
//===--------------------------------------------------===//
|
//===--------------------------------------------------===//
|
||||||
|
|
||||||
void verify() const { if (Root) Root->verify(); }
|
void verify() const { if (Root) Root->verify(); }
|
||||||
unsigned getHeight() const { return Root ? Root->getHeight() : 0; }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // end namespace llvm
|
} // end namespace llvm
|
||||||
|
Reference in New Issue
Block a user