summaryrefslogtreecommitdiff
path: root/lib/Transforms/Instrumentation/CGProfile.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-01-19 10:01:25 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-01-19 10:01:25 +0000
commitd8e91e46262bc44006913e6796843909f1ac7bcd (patch)
tree7d0c143d9b38190e0fa0180805389da22cd834c5 /lib/Transforms/Instrumentation/CGProfile.cpp
parentb7eb8e35e481a74962664b63dfb09483b200209a (diff)
Notes
Diffstat (limited to 'lib/Transforms/Instrumentation/CGProfile.cpp')
-rw-r--r--lib/Transforms/Instrumentation/CGProfile.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/Transforms/Instrumentation/CGProfile.cpp b/lib/Transforms/Instrumentation/CGProfile.cpp
index 9606b3da2475..cdcd01726906 100644
--- a/lib/Transforms/Instrumentation/CGProfile.cpp
+++ b/lib/Transforms/Instrumentation/CGProfile.cpp
@@ -88,11 +88,10 @@ void CGProfilePass::addModuleFlags(
std::vector<Metadata *> Nodes;
for (auto E : Counts) {
- SmallVector<Metadata *, 3> Vals;
- Vals.push_back(ValueAsMetadata::get(E.first.first));
- Vals.push_back(ValueAsMetadata::get(E.first.second));
- Vals.push_back(MDB.createConstant(
- ConstantInt::get(Type::getInt64Ty(Context), E.second)));
+ Metadata *Vals[] = {ValueAsMetadata::get(E.first.first),
+ ValueAsMetadata::get(E.first.second),
+ MDB.createConstant(ConstantInt::get(
+ Type::getInt64Ty(Context), E.second))};
Nodes.push_back(MDNode::get(Context, Vals));
}