diff options
-rw-r--r-- | include/llvm/ADT/ImmutableSet.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/llvm/ADT/ImmutableSet.h b/include/llvm/ADT/ImmutableSet.h index 3ff6571481..0210f27b89 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<TreeTy>(); new (T) TreeTy(L,R,V,IncrementHeight(L,R)); - Cache.InsertNode(T,InsertPos); + return T; } |