mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 05:29:24 +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);
|
||||
|
||||
// FIXME: more intelligent calculation of alignment.
|
||||
TreeTy* T = (TreeTy*) Allocator.Allocate(sizeof(*T),16);
|
||||
|
||||
// Allocate the new tree node and insert it into the cache.
|
||||
TreeTy* T = Allocator.Allocate<TreeTy>();
|
||||
new (T) TreeTy(L,R,V,IncrementHeight(L,R));
|
||||
|
||||
Cache.InsertNode(T,InsertPos);
|
||||
|
||||
return T;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user