diff options
author | Kazu Hirata <kazu@google.com> | 2021-01-16 09:40:53 -0800 |
---|---|---|
committer | Kazu Hirata <kazu@google.com> | 2021-01-16 09:40:53 -0800 |
commit | 19aacdb715aea1de56a47b807a555335610a11c2 (patch) | |
tree | 079ea2bddde7e0fc66e0291a3e1d9d28004851b7 /llvm/lib/Transforms/Utils/CallPromotionUtils.cpp | |
parent | ba0fc7e1f8d57a7a7dce1a2d604b12e5210dc10f (diff) | |
download | llvm-19aacdb715aea1de56a47b807a555335610a11c2.zip llvm-19aacdb715aea1de56a47b807a555335610a11c2.tar.gz llvm-19aacdb715aea1de56a47b807a555335610a11c2.tar.bz2 |
[llvm] Construct SmallVector with iterator ranges (NFC)
Diffstat (limited to 'llvm/lib/Transforms/Utils/CallPromotionUtils.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/CallPromotionUtils.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/CallPromotionUtils.cpp b/llvm/lib/Transforms/Utils/CallPromotionUtils.cpp index 7141e4b..f9207df 100644 --- a/llvm/lib/Transforms/Utils/CallPromotionUtils.cpp +++ b/llvm/lib/Transforms/Utils/CallPromotionUtils.cpp @@ -165,9 +165,7 @@ static void createRetBitCast(CallBase &CB, Type *RetTy, CastInst **RetBitCast) { // Save the users of the calling instruction. These uses will be changed to // use the bitcast after we create it. - SmallVector<User *, 16> UsersToUpdate; - for (User *U : CB.users()) - UsersToUpdate.push_back(U); + SmallVector<User *, 16> UsersToUpdate(CB.users()); // Determine an appropriate location to create the bitcast for the return // value. The location depends on if we have a call or invoke instruction. |