diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2015-02-17 16:48:30 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2015-02-17 16:48:30 +0000 |
commit | f989042f181cbf4d55e74f3ff1a75bc1b765a2a6 (patch) | |
tree | 3a5a3e33192efd1c94685473edf3b02263c32d00 /clang/lib/CodeGen/CGBlocks.cpp | |
parent | bc3776803b817e2384e1665cede66133d661c593 (diff) | |
download | bcm5719-llvm-f989042f181cbf4d55e74f3ff1a75bc1b765a2a6.tar.gz bcm5719-llvm-f989042f181cbf4d55e74f3ff1a75bc1b765a2a6.zip |
Prefer SmallVector::append/insert over push_back loops. Clang edition.
Same functionality, but hoists the vector growth out of the loop.
llvm-svn: 229508
Diffstat (limited to 'clang/lib/CodeGen/CGBlocks.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGBlocks.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp index 968c54ef849..7b8e839efa5 100644 --- a/clang/lib/CodeGen/CGBlocks.cpp +++ b/clang/lib/CodeGen/CGBlocks.cpp @@ -1136,8 +1136,7 @@ CodeGenFunction::GenerateBlockFunction(GlobalDecl GD, args.push_back(&selfDecl); // Now add the rest of the parameters. - for (auto i : blockDecl->params()) - args.push_back(i); + args.append(blockDecl->param_begin(), blockDecl->param_end()); // Create the function declaration. const FunctionProtoType *fnType = blockInfo.getBlockExpr()->getFunctionType(); |