[all-commits] [llvm/llvm-project] b8e878: [libc] Rework 'cpp:optional' to support move const...

Joseph Huber via All-commits all-commits at lists.llvm.org
Fri May 5 11:45:38 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b8e878da5c2ee65cc7a357890d83445625b59c79
      https://github.com/llvm/llvm-project/commit/b8e878da5c2ee65cc7a357890d83445625b59c79
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2023-05-05 (Fri, 05 May 2023)

  Changed paths:
    M libc/src/__support/CPP/optional.h

  Log Message:
  -----------
  [libc] Rework 'cpp:optional' to support move construction

This patch replaces the existing `cpp::optional` type with a newer
version that has more features. This class is heavily inspired by the
old `llvm::Optional` class. Currently the limitations of this class is
that we only handle types with trivial constructors or operators.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D149972


  Commit: 71d2b65e3659a75ea3e3aa376f4f46d187126885
      https://github.com/llvm/llvm-project/commit/71d2b65e3659a75ea3e3aa376f4f46d187126885
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2023-05-05 (Fri, 05 May 2023)

  Changed paths:
    M libc/src/__support/RPC/rpc.h

  Log Message:
  -----------
  [libc] Make the RPC interfaces move only

This patch uses the changed interface in D149972 to make these classes
move-only. The `Port` class could be further refined to be
construct-only in a future patch, but for now this makes it more
difficult to misuse the interface.

Depends on D149972

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D149974


Compare: https://github.com/llvm/llvm-project/compare/8eed9f38ca36...71d2b65e3659


More information about the All-commits mailing list