forked from OSchip/llvm-project
Deallocate() methods now take a 'const void*' instead of a 'void *', matching observed behavior with how 'delete[]' can be used.
llvm-svn: 63956
This commit is contained in:
parent
1a5f04dc66
commit
474f20efe3
|
@ -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