From ef9dbc69b51c02b2657e0a4fa3002a3d6949acf5 Mon Sep 17 00:00:00 2001 From: Xinliang David Li Date: Tue, 24 Nov 2015 00:32:00 +0000 Subject: [PATCH] Use make_unique [NFC] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253942 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ProfileData/InstrProf.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/llvm/ProfileData/InstrProf.h b/include/llvm/ProfileData/InstrProf.h index cc49452eb87..b28689bfce1 100644 --- a/include/llvm/ProfileData/InstrProf.h +++ b/include/llvm/ProfileData/InstrProf.h @@ -18,6 +18,7 @@ #include "llvm/ADT/StringRef.h" #include "llvm/ADT/StringSet.h" +#include "llvm/ADT/STLExtras.h" #include "llvm/IR/GlobalValue.h" #include "llvm/ProfileData/InstrProfData.inc" #include "llvm/Support/Endian.h" @@ -367,7 +368,7 @@ InstrProfRecord::getValueForSite(uint32_t ValueKind, uint32_t Site) const { if (N == 0) return std::unique_ptr(nullptr); - std::unique_ptr VD(new InstrProfValueData[N]); + auto VD = llvm::make_unique(N); uint32_t I = 0; for (auto V : getValueSitesForKind(ValueKind)[Site].ValueData) { VD[I] = V; -- 2.34.1