From 52e2d83e653abd745d93bc05acba59c32a64eabf Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Thu, 18 Oct 2007 00:30:14 +0000 Subject: 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43106 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/Allocator.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/llvm/Support/Allocator.h') diff --git a/include/llvm/Support/Allocator.h b/include/llvm/Support/Allocator.h index 397cf0c7c2..729cc674a8 100644 --- a/include/llvm/Support/Allocator.h +++ b/include/llvm/Support/Allocator.h @@ -28,7 +28,7 @@ public: void *Allocate(unsigned Size, unsigned Alignment) { return malloc(Size); } template - T* Allocate() { return reinterpret_cast(malloc(sizeof(T))); } + void *Allocate() { return reinterpret_cast(malloc(sizeof(T))); } void Deallocate(void *Ptr) { free(Ptr); } void PrintStats() const {} @@ -48,7 +48,7 @@ public: void *Allocate(unsigned Size, unsigned Alignment); template - T* Allocate() { + void *Allocate() { return reinterpret_cast(Allocate(sizeof(T),AlignOf::Alignment)); } -- cgit v1.2.3