From: Xinliang David Li Date: Tue, 1 Dec 2015 23:05:27 +0000 (+0000) Subject: Define member operator delete X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=b0e1e32b73001e71fc702febc0066bd8d0fb07ce;ds=sidebyside 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254471 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/ProfileData/InstrProfData.inc b/include/llvm/ProfileData/InstrProfData.inc index 8ff7003a0b2..a2f0a8ae684 100644 --- a/include/llvm/ProfileData/InstrProfData.inc +++ b/include/llvm/ProfileData/InstrProfData.inc @@ -291,6 +291,7 @@ typedef struct ValueProfData { */ void deserializeTo(InstrProfRecord &Record, InstrProfRecord::ValueMapType *VMap); + void operator delete(void *ptr) { ::operator delete(ptr); } #endif } ValueProfData;