Fixed a strange construct. Please review.
[oota-llvm.git] / include / llvm / ADT / ImmutableSet.h
index 3ff6571481ad0fd4b2f90de6f818a885e4913c13..c33717a1242a103437d52bdad6d234e57b03652f 100644 (file)
@@ -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 = (TreeTy*) Allocator.Allocate<TreeTy>();    
     new (T) TreeTy(L,R,V,IncrementHeight(L,R));
-    
     Cache.InsertNode(T,InsertPos);
+
     return T;      
   }