[PATCH] D99560: Utility to construct visitors from lambdas.

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 2 11:34:43 PDT 2021


dblaikie added a comment.

In D99560#2665902 <https://reviews.llvm.org/D99560#2665902>, @bakhtiyarneyman wrote:

> Regarding deriving from using other kinds of functors: I have not yet seen a need for this. My preference is to cross that bridge when we reach it. :)
>
> Regarding taking references to the functors: I played around but on my first attempts the assembly seemed to have become scarier than without the references, so I decided not to push it further. Here's the evidence: https://godbolt.org/z/eoGKMW3jx

I worry that without this kind of design it'll be awkward to use and inefficient - copying (even if that's fixed to use move instead) lambdas when they could have many captures/be expensive to copy, etc.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99560/new/

https://reviews.llvm.org/D99560



More information about the llvm-commits mailing list