mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 05:01:59 +01:00
Changed the return type of type-specific Allocate() methods to return
void*. This is hint that we are returning uninitialized memory rather than a constructed object. Patched ImutAVLTree to conform to this new interface. llvm-svn: 43106
This commit is contained in:
parent
1c34d807ce
commit
c00b2095fa
@ -374,7 +374,7 @@ private:
|
||||
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);
|
||||
|
||||
|
@ -28,7 +28,7 @@ public:
|
||||
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 {}
|
||||
@ -48,7 +48,7 @@ public:
|
||||
void *Allocate(unsigned Size, unsigned Alignment);
|
||||
|
||||
template <typename T>
|
||||
T* Allocate() {
|
||||
void *Allocate() {
|
||||
return reinterpret_cast<T*>(Allocate(sizeof(T),AlignOf<T>::Alignment));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user