diff options
author | Ted Kremenek <kremenek@apple.com> | 2007-10-17 22:17:01 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2007-10-17 22:17:01 +0000 |
commit | fa4710427fc5db4e8e27e3eeaa3dd03a65f70101 (patch) | |
tree | f3a66aa80416f53c198b9007cb6e5d66bd990855 /include/llvm/ADT/ImmutableSet.h | |
parent | 129d7d3bde306d186df552694eb511f5fe8bda6b (diff) | |
download | external_llvm-fa4710427fc5db4e8e27e3eeaa3dd03a65f70101.zip external_llvm-fa4710427fc5db4e8e27e3eeaa3dd03a65f70101.tar.gz external_llvm-fa4710427fc5db4e8e27e3eeaa3dd03a65f70101.tar.bz2 |
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
Diffstat (limited to 'include/llvm/ADT/ImmutableSet.h')
-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 3ff6571..0210f27 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; } |