1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00

Define member operator delete

For the struct with trailing objects, define
a member operator delete. Without this, the program
will fail when -fsized-deallocation option is used
where the wrong size will be passed to the global
delete operator.

llvm-svn: 254471
This commit is contained in:
Xinliang David Li 2015-12-01 23:05:27 +00:00
parent a4bcdcc1fc
commit c258245ddf

View File

@ -291,6 +291,7 @@ typedef struct ValueProfData {
*/ */
void deserializeTo(InstrProfRecord &Record, void deserializeTo(InstrProfRecord &Record,
InstrProfRecord::ValueMapType *VMap); InstrProfRecord::ValueMapType *VMap);
void operator delete(void *ptr) { ::operator delete(ptr); }
#endif #endif
} ValueProfData; } ValueProfData;