diff options
| author | Xinliang David Li <davidxl@google.com> | 2015-11-24 00:32:00 +0000 |
|---|---|---|
| committer | Xinliang David Li <davidxl@google.com> | 2015-11-24 00:32:00 +0000 |
| commit | ff1a0bb2546c834e64e9f1d4f4b48edfd100389c (patch) | |
| tree | b100f085997bdd8126e4d8bf7fe13d23000a7ae3 /llvm | |
| parent | b46ad0a3c8a568e9a41b36848c42f45ab9665fea (diff) | |
| download | bcm5719-llvm-ff1a0bb2546c834e64e9f1d4f4b48edfd100389c.tar.gz bcm5719-llvm-ff1a0bb2546c834e64e9f1d4f4b48edfd100389c.zip | |
Use make_unique [NFC]
llvm-svn: 253942
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/ProfileData/InstrProf.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/include/llvm/ProfileData/InstrProf.h b/llvm/include/llvm/ProfileData/InstrProf.h index cc49452eb87..b28689bfce1 100644 --- a/llvm/include/llvm/ProfileData/InstrProf.h +++ b/llvm/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<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; |

