[all-commits] [llvm/llvm-project] 14a8aa: [ADT] Add makeVisitor to STLExtras.h

Scott Linder via All-commits all-commits at lists.llvm.org
Mon Jun 28 12:36:41 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 14a8aa615597ef0aa424ac9545906bf8b9865063
      https://github.com/llvm/llvm-project/commit/14a8aa615597ef0aa424ac9545906bf8b9865063
  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

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