mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-07-17 20:29:31 +00:00
ImutAVLTree now allocates tree nodes from the BumpPtrAllocator using
the new type-aligned Allocate() method. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43100 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
129d7d3bde
commit
fa4710427f
@ -373,12 +373,11 @@ private:
|
|||||||
|
|
||||||
assert (InsertPos != NULL);
|
assert (InsertPos != NULL);
|
||||||
|
|
||||||
// FIXME: more intelligent calculation of alignment.
|
// Allocate the new tree node and insert it into the cache.
|
||||||
TreeTy* T = (TreeTy*) Allocator.Allocate(sizeof(*T),16);
|
TreeTy* T = Allocator.Allocate<TreeTy>();
|
||||||
|
|
||||||
new (T) TreeTy(L,R,V,IncrementHeight(L,R));
|
new (T) TreeTy(L,R,V,IncrementHeight(L,R));
|
||||||
|
|
||||||
Cache.InsertNode(T,InsertPos);
|
Cache.InsertNode(T,InsertPos);
|
||||||
|
|
||||||
return T;
|
return T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user