From b0e1e32b73001e71fc702febc0066bd8d0fb07ce Mon Sep 17 00:00:00 2001 From: Xinliang David Li Date: Tue, 1 Dec 2015 23:05:27 +0000 Subject: [PATCH] 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 --- include/llvm/ProfileData/InstrProfData.inc | 1 + 1 file changed, 1 insertion(+) 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; -- 2.34.1