projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4905273
)
Use make_unique [NFC]
author
Xinliang David Li
<davidxl@google.com>
Tue, 24 Nov 2015 00:32:00 +0000
(
00:32
+0000)
committer
Xinliang 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
patch
|
blob
|
history
diff --git
a/include/llvm/ProfileData/InstrProf.h
b/include/llvm/ProfileData/InstrProf.h
index
cc49452
..
b28689b
100644
(file)
--- 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<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;