Skip to content

Commit cf18e5e

Browse files
[ProfileData] Remove an unnecessary cast (NFC) (#152087)
new already returns ValueProfData *.
1 parent 94dc3c6 commit cf18e5e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/ProfileData/InstrProf.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,8 +1160,7 @@ void getValueForSiteInstrProf(const void *R, InstrProfValueData *Dst,
11601160
}
11611161

11621162
ValueProfData *allocValueProfDataInstrProf(size_t TotalSizeInBytes) {
1163-
ValueProfData *VD =
1164-
(ValueProfData *)(new (::operator new(TotalSizeInBytes)) ValueProfData());
1163+
ValueProfData *VD = new (::operator new(TotalSizeInBytes)) ValueProfData();
11651164
memset(VD, 0, TotalSizeInBytes);
11661165
return VD;
11671166
}

0 commit comments

Comments
 (0)