diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2015-02-28 13:20:15 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2015-02-28 13:20:15 +0000 |
commit | 5fbfe2ffdcb9a0c8b5b87ed370e01d5bcd2856ac (patch) | |
tree | 59f678254c881949b7a511b3a464db18663fb5a3 /llvm/lib/Transforms/IPO/ArgumentPromotion.cpp | |
parent | 42a7adf171b44f32a155cd80fe8c22a2a41eb11b (diff) | |
download | llvm-5fbfe2ffdcb9a0c8b5b87ed370e01d5bcd2856ac.zip llvm-5fbfe2ffdcb9a0c8b5b87ed370e01d5bcd2856ac.tar.gz llvm-5fbfe2ffdcb9a0c8b5b87ed370e01d5bcd2856ac.tar.bz2 |
Convert push_back loops into append calls.
No functionality change intended.
llvm-svn: 230849
Diffstat (limited to 'llvm/lib/Transforms/IPO/ArgumentPromotion.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/ArgumentPromotion.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp index 7e48ce3..52b800d 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<PointerType>(I->getType())->getElementType(); StructType *STy = cast<StructType>(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 |