[CGProfile] Turn constant-size SmallVector into array

No functionality change.

llvm-svn: 344893
This commit is contained in:
Benjamin Kramer 2018-10-22 10:51:34 +00:00
parent 6e924df28d
commit 3e778165d6
1 changed files with 4 additions and 5 deletions

View File

@ -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));
}