diff options
Diffstat (limited to 'include/llvm/Support/Allocator.h')
-rw-r--r-- | include/llvm/Support/Allocator.h | 4 |
1 files changed, 2 insertions, 2 deletions
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 <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)); } |