[PATCH] D79616: [NFC][DwarfDebug] Avoid default capturing when using lambdas
Djordje Todorovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 8 03:11:19 PDT 2020
djtodoro marked an inline comment as done.
djtodoro added inline comments.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp:710
+ auto getForwardingRegsDefinedByMI =
+ [&ForwardedRegWorklist, &TRI](const MachineInstr &MI,
+ SmallSetVector<unsigned, 4> &Defs) {
----------------
dstenb wrote:
> djtodoro wrote:
> > dstenb wrote:
> > > Perhaps `ForwardedRegWorklist` even should be passed as a parameter? That could further show the intent of the function.
> > Makes sense to me, thanks!
> Oh, and as `TRI` is a pointer maybe the reference should not be used here? Perhaps we should change the auto references to pointers at line 655-657 to stress that?
Hm, good point. We should avoid auto type deduction when the type is so obvious.
I'll add another small NFC patch refactoring that as well.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79616/new/
https://reviews.llvm.org/D79616
More information about the llvm-commits
mailing list