Use make_unique [NFC]
authorXinliang David Li <davidxl@google.com>
Tue, 24 Nov 2015 00:32:00 +0000 (00:32 +0000)
committerXinliang David Li <davidxl@google.com>
Tue, 24 Nov 2015 00:32:00 +0000 (00:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253942 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ProfileData/InstrProf.h

index cc49452eb87317429232dd4c43ef9cec0e2d9498..b28689bfce1d5898c5df65655bcb7e01a8468c54 100644 (file)
@@ -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<InstrProfValueData[]>(nullptr);
 
-  std::unique_ptr<InstrProfValueData[]> VD(new InstrProfValueData[N]);
+  auto VD = llvm::make_unique<InstrProfValueData[]>(N);
   uint32_t I = 0;
   for (auto V : getValueSitesForKind(ValueKind)[Site].ValueData) {
     VD[I] = V;