void*. This is hint that we are returning uninitialized memory rather
than a constructed object.
Patched ImutAVLTree to conform to this new interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43106
91177308-0d34-0410-b5e6-
96231b3b80d8
assert (InsertPos != NULL);
// Allocate the new tree node and insert it into the cache.
- TreeTy* T = Allocator.Allocate<TreeTy>();
+ TreeTy* T = (TreeTy*) Allocator.Allocate<TreeTy>();
new (T) TreeTy(L,R,V,IncrementHeight(L,R));
Cache.InsertNode(T,InsertPos);
void *Allocate(unsigned Size, unsigned Alignment) { return malloc(Size); }
template <typename T>
- T* Allocate() { return reinterpret_cast<T*>(malloc(sizeof(T))); }
+ void *Allocate() { return reinterpret_cast<T*>(malloc(sizeof(T))); }
void Deallocate(void *Ptr) { free(Ptr); }
void PrintStats() const {}
void *Allocate(unsigned Size, unsigned Alignment);
template <typename T>
- T* Allocate() {
+ void *Allocate() {
return reinterpret_cast<T*>(Allocate(sizeof(T),AlignOf<T>::Alignment));
}