mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-22 03:39:03 +00:00
add some accessors so I can play games with DenseMaps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68145 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
de62192843
commit
bdd376ccb2
@ -279,6 +279,18 @@ public:
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// isPointerIntoBucketsArray - Return true if the specified pointer points
|
||||||
|
/// somewhere into the DenseMap's array of buckets (i.e. either to a key or
|
||||||
|
/// value in the DenseMap).
|
||||||
|
bool isPointerIntoBucketsArray(const void *Ptr) const {
|
||||||
|
return Ptr >= Buckets && Ptr < Buckets+NumBuckets;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// getPointerIntoBucketsArray() - Return an opaque pointer into the buckets
|
||||||
|
/// array. In conjunction with the previous method, this can be used to
|
||||||
|
/// determine whether an insertion caused the DenseMap to reallocate.
|
||||||
|
const void *getPointerIntoBucketsArray() const { return Buckets; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void CopyFrom(const DenseMap& other) {
|
void CopyFrom(const DenseMap& other) {
|
||||||
if (NumBuckets != 0 && (!KeyInfoT::isPod() || !ValueInfoT::isPod())) {
|
if (NumBuckets != 0 && (!KeyInfoT::isPod() || !ValueInfoT::isPod())) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user