mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 08:17:40 +00:00
Added "bucket_iterators" to FoldingSet. Bucket iterators allow iteration
over all the nodes in a particular bucket. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46716 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -148,7 +148,7 @@ static FoldingSetImpl::Node *GetNextPtr(void *NextInBucketPtr) {
|
||||
return static_cast<FoldingSetImpl::Node*>(NextInBucketPtr);
|
||||
}
|
||||
|
||||
/// GetBucketPtr - Provides a casting of a bucket pointer for isNode
|
||||
|
||||
/// testing.
|
||||
static void **GetBucketPtr(void *NextInBucketPtr) {
|
||||
intptr_t Ptr = reinterpret_cast<intptr_t>(NextInBucketPtr);
|
||||
@@ -358,3 +358,9 @@ void FoldingSetIteratorImpl::advance() {
|
||||
}
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// FoldingSetBucketIteratorImpl Implementation
|
||||
|
||||
FoldingSetBucketIteratorImpl::FoldingSetBucketIteratorImpl(void **Bucket) {
|
||||
Ptr = (*Bucket == 0 || GetNextPtr(*Bucket) == 0) ? (void*) Bucket : *Bucket;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user