From cf18e5e0f84b23f5dc410af5447ca03b62aaa12c Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Tue, 5 Aug 2025 07:39:14 -0700 Subject: [ProfileData] Remove an unnecessary cast (NFC) (#152087) new already returns ValueProfData *. --- llvm/lib/ProfileData/InstrProf.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'llvm/lib') diff --git a/llvm/lib/ProfileData/InstrProf.cpp b/llvm/lib/ProfileData/InstrProf.cpp index bd3964c..5425729 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; } -- cgit v1.1