r206304 - Replace push_back()s by initializer list for shorter and cleaner code.
Eli Bendersky
eliben at google.com
Tue Apr 15 10:19:27 PDT 2014
Author: eliben
Date: Tue Apr 15 12:19:26 2014
New Revision: 206304
URL: http://llvm.org/viewvc/llvm-project?rev=206304&view=rev
Log:
Replace push_back()s by initializer list for shorter and cleaner code.
Modified:
cfe/trunk/lib/CodeGen/TargetInfo.cpp
Modified: cfe/trunk/lib/CodeGen/TargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/TargetInfo.cpp?rev=206304&r1=206303&r2=206304&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/TargetInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/TargetInfo.cpp Tue Apr 15 12:19:26 2014
@@ -4872,11 +4872,9 @@ void NVPTXTargetCodeGenInfo::addNVVMMeta
// 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));
}
More information about the cfe-commits
mailing list