[all-commits] [llvm/llvm-project] 6d6f35: [ADT] Add makeVisitor to STLExtras.h
Scott Linder via All-commits
all-commits at lists.llvm.org
Mon Jun 28 13:07:42 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6d6f35eb7b92c6dd4478834497752f4e963db16d
https://github.com/llvm/llvm-project/commit/6d6f35eb7b92c6dd4478834497752f4e963db16d
Author: Scott Linder <Scott.Linder at amd.com>
Date: 2021-06-28 (Mon, 28 Jun 2021)
Changed paths:
M llvm/include/llvm/ADT/STLExtras.h
M llvm/unittests/ADT/STLExtrasTest.cpp
Log Message:
-----------
[ADT] Add makeVisitor to STLExtras.h
Relands patch reverted by 61242c0addb120294211d24a97ed89837418cb36
The original patch mistakenly included unrelated tests.
Adds a utility to combine multiple Callables into a single Callable.
This is useful to make constructing a visitor for `std::visit`-like
functions more natural; functions like this will be added in future
patches.
Intended to supercede https://reviews.llvm.org/D99560 by
perfectly-forwarding the combined Callables.
Reviewed By: dblaikie
Differential Revision: https://reviews.llvm.org/D100670
More information about the All-commits
mailing list