diff --git a/llvm/lib/ProfileData/InstrProf.cpp b/llvm/lib/ProfileData/InstrProf.cpp index bd3964ce127fd..542572975dc89 100644 --- a/llvm/lib/ProfileData/InstrProf.cpp +++ b/llvm/lib/ProfileData/InstrProf.cpp @@ -1160,8 +1160,7 @@ void getValueForSiteInstrProf(const void *R, InstrProfValueData *Dst, } ValueProfData *allocValueProfDataInstrProf(size_t TotalSizeInBytes) { - ValueProfData *VD = - (ValueProfData *)(new (::operator new(TotalSizeInBytes)) ValueProfData()); + ValueProfData *VD = new (::operator new(TotalSizeInBytes)) ValueProfData(); memset(VD, 0, TotalSizeInBytes); return VD; }