mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-05 18:37:17 +00:00
Deallocate() methods now take a 'const void*' instead of a 'void *', matching observed behavior with how 'delete[]' can be used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63956 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f5f5dce897
commit
3f4c81de0a
@ -36,7 +36,7 @@ public:
|
||||
return static_cast<T*>(malloc(sizeof(T)*Num));
|
||||
}
|
||||
|
||||
void Deallocate(void *Ptr) { free(Ptr); }
|
||||
void Deallocate(const void *Ptr) { free(const_cast<void*>(Ptr)); }
|
||||
|
||||
void PrintStats() const {}
|
||||
};
|
||||
@ -80,9 +80,8 @@ public:
|
||||
unsigned EltSize = (sizeof(T)+Alignment-1)&~Alignment;
|
||||
return static_cast<T*>(Allocate(Num * EltSize, Alignment));
|
||||
}
|
||||
|
||||
|
||||
void Deallocate(void * /*Ptr*/) {}
|
||||
|
||||
void Deallocate(const void * /*Ptr*/) {}
|
||||
|
||||
void PrintStats() const;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user