Replace push_back()s by initializer list for shorter and cleaner code.

llvm-svn: 206304
This commit is contained in:
Eli Bendersky 2014-04-15 17:19:26 +00:00
parent 8578c8f1e3
commit e1627b43f9
1 changed files with 3 additions and 5 deletions

View File

@ -4872,11 +4872,9 @@ void NVPTXTargetCodeGenInfo::addNVVMMetadata(llvm::Function *F, StringRef Name,
// Get "nvvm.annotations" metadata node
llvm::NamedMDNode *MD = M->getOrInsertNamedMetadata("nvvm.annotations");
llvm::SmallVector<llvm::Value *, 3> MDVals;
MDVals.push_back(F);
MDVals.push_back(llvm::MDString::get(Ctx, Name));
MDVals.push_back(
llvm::ConstantInt::get(llvm::Type::getInt32Ty(Ctx), Operand));
llvm::Value *MDVals[] = {
F, llvm::MDString::get(Ctx, Name),
llvm::ConstantInt::get(llvm::Type::getInt32Ty(Ctx), Operand)};
// Append metadata to nvvm.annotations
MD->addOperand(llvm::MDNode::get(Ctx, MDVals));
}