From: Ted Kremenek Date: Wed, 17 Oct 2007 22:17:01 +0000 (+0000) Subject: ImutAVLTree now allocates tree nodes from the BumpPtrAllocator using X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=fa4710427fc5db4e8e27e3eeaa3dd03a65f70101;p=oota-llvm.git 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 --- diff --git a/include/llvm/ADT/ImmutableSet.h b/include/llvm/ADT/ImmutableSet.h index 3ff6571481a..0210f27b895 100644 --- a/include/llvm/ADT/ImmutableSet.h +++ b/include/llvm/ADT/ImmutableSet.h @@ -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(); new (T) TreeTy(L,R,V,IncrementHeight(L,R)); - Cache.InsertNode(T,InsertPos); + return T; }