forked from OSchip/llvm-project
ImutAVLTree now allocates tree nodes from the BumpPtrAllocator using
the new type-aligned Allocate() method. llvm-svn: 43100
This commit is contained in:
parent
3830606dee
commit
603fbbfcb7
|
@ -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