[PATCH] D143019: [BOLT][NFC] Use llvm::make_second_range
Rafael Auler via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 1 11:47:08 PST 2023
rafauler added inline comments.
================
Comment at: bolt/lib/Core/BinaryContext.cpp:1521
AllFunctions.reserve(BinaryFunctions.size() + InjectedBinaryFunctions.size());
- llvm::transform(BinaryFunctions, std::back_inserter(AllFunctions),
- [](std::pair<const uint64_t, BinaryFunction> &BFI) {
- return &BFI.second;
- });
+ llvm::transform(llvm::make_second_range(BinaryFunctions),
+ std::back_inserter(AllFunctions),
----------------
Shouldn't this be
llvm::copy(llvm::make_second_range(BinaryFunctions), std::back_inserter(AllFunctions));
like you did in IndirectCallPromotion.cpp? Similarly for other changes.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143019/new/
https://reviews.llvm.org/D143019
More information about the llvm-commits
mailing list