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:
Ted Kremenek 2007-10-17 22:17:01 +00:00
parent 129d7d3bde
commit fa4710427f

View File

@ -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;
} }