[PATCH] D77817: [llvm][NFC] Replace CallSite with CallBase in Inliner
Mircea Trofin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 9 12:12:24 PDT 2020
mtrofin added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/Inliner.cpp:1157
std::remove_if(Calls.begin() + i + 1, Calls.end(),
- [&Callee](const std::pair<CallSite, int> &Call) {
- return Call.first.getCaller() == &Callee;
+ [&Callee](const std::pair<CallBase *, int> &Call) {
+ return Call.first->getCaller() == &Callee;
----------------
dblaikie wrote:
> Side note (not related to this patch (saw some other instances while reviewing this too, though) - but might be handy for reference otherwise) - generally for a locally used lambda like this (especially a lambda only used within its expression) I'd encourage using [&] rather than an explicit capture list - like any other nested scope, it should have access to all the enclosing variables implicitly.
Ack - subsequent change. There are also naming inconsistencies (for (int i, instead of int I, etc))
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77817/new/
https://reviews.llvm.org/D77817
More information about the llvm-commits
mailing list