[PATCH] D99560: Utility to construct visitors from lambdas.
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 30 20:59:34 PDT 2021
dblaikie added a comment.
In D99560#2660032 <https://reviews.llvm.org/D99560#2660032>, @bakhtiyarneyman wrote:
> Re: handleAllErrors. Maybe. It //might// result in better runtime performance (because there is not recursion on the handlers), but it's also a rewrite. I am not sure if you are asking me to do something. :)
Not asking you to do anything necessarily - though I think it's worth someone (you or @lhames perhaps) checking if the abstraction generalizes well to other/existing use cases.
This relies on the ability to derive from the functors passed into this code - any sense of whether it should be generalized over functors that may not be able to be derived from?
It also makes a copy of the functors (could be improved to use move construction, I think?) - would it be appropriate for this to be more direct, only taking references to the functors? (but then only usable directly/within the same full expression, without creating a visitor object that could be used later)
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