the new type-aligned Allocate() method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43100
91177308-0d34-0410-b5e6-
96231b3b80d8
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;
}