diff options
Diffstat (limited to 'lib/Transforms/Instrumentation/CGProfile.cpp')
-rw-r--r-- | lib/Transforms/Instrumentation/CGProfile.cpp | 9 |
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)); } |