forked from OSchip/llvm-project
Replace push_back()s by initializer list for shorter and cleaner code.
llvm-svn: 206304
This commit is contained in:
parent
8578c8f1e3
commit
e1627b43f9
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue