From 5fbfe2ffdcb9a0c8b5b87ed370e01d5bcd2856ac Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sat, 28 Feb 2015 13:20:15 +0000 Subject: Convert push_back loops into append calls. No functionality change intended. llvm-svn: 230849 --- llvm/lib/Transforms/IPO/ArgumentPromotion.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'llvm/lib/Transforms/IPO') diff --git a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp index 7e48ce37bcd..52b800da4f2 100644 --- a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp +++ b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp @@ -623,8 +623,7 @@ CallGraphNode *ArgPromotion::DoPromotion(Function *F, // Simple byval argument? Just add all the struct element types. Type *AgTy = cast(I->getType())->getElementType(); StructType *STy = cast(AgTy); - for (unsigned i = 0, e = STy->getNumElements(); i != e; ++i) - Params.push_back(STy->getElementType(i)); + Params.insert(Params.end(), STy->element_begin(), STy->element_end()); ++NumByValArgsPromoted; } else if (!ArgsToPromote.count(I)) { // Unchanged argument -- cgit v1.2.3